Ejemplo n.º 1
0
CCGridBase* CCGridBase::create(const ccGridSize& gridSize)
{
    CCGridBase *pGridBase = new CCGridBase();

    if (pGridBase)
    {
        if (pGridBase->initWithSize(gridSize))
        {
            pGridBase->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pGridBase);
        }
    }

    return pGridBase;
}
Ejemplo n.º 2
0
CCGridBase* CCGridBase::create(const CCSize& gridSize, CAImage* texture, bool flipped)
{
    CCGridBase *pGridBase = new CCGridBase();

    if (pGridBase)
    {
        if (pGridBase->initWithSize(gridSize, texture, flipped))
        {
            pGridBase->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pGridBase);
        }
    }

    return pGridBase;
}
Ejemplo n.º 3
0
	CCGridBase* CCGridBase::gridWithSize(ccGridSize gridSize, CCTexture2D *texture, bool flipped)
	{
		CCGridBase *pGridBase = new CCGridBase();

		if (pGridBase)
		{
			if (pGridBase->initWithSize(gridSize, texture, flipped))
			{
				pGridBase->autorelease();
			}
			else
			{
				CC_SAFE_RELEASE_NULL(pGridBase);
			}
		}

		return pGridBase;
	}
Ejemplo n.º 4
0
NS_CC_BEGIN
// implementation of CCGridBase

CCGridBase* CCGridBase::create(const CCSize& gridSize)
{
    CCGridBase *pGridBase = new CCGridBase();

    if (pGridBase)
    {
        if (pGridBase->initWithSize(gridSize))
        {
            pGridBase->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pGridBase);
        }
    }

    return pGridBase;
}