CCGridBase* CCGridBase::create(const CCSize& 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;
}
	CCGridBase* CCGridBase::gridWithSize(cocos2d::ccGridSize gridSize)
	{
        CCGridBase *pGridBase = new CCGridBase();

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

		return pGridBase;
	}
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;
}