void FNTConfigRemoveCache( void )
	{
		if (configurations)
		{
			configurations->removeAllObjects();
            CCX_SAFE_RELEASE_NULL(configurations);
		}
	}
Exemplo n.º 2
0
	// implementation of TurnOffTiles
	CCTurnOffTiles* CCTurnOffTiles::actionWithSize(ccGridSize size, ccTime d)
	{
		CCTurnOffTiles* pAction = new CCTurnOffTiles();
		if (pAction->initWithSize(size, d))
		{
			pAction->autorelease();
		}
		else
		{
			CCX_SAFE_RELEASE_NULL(pAction);
		}
		return pAction;
	}
Exemplo n.º 3
0
	CCEaseElasticIn* CCEaseElasticIn::actionWithAction(CCIntervalAction *pAction)
	{
		CCEaseElasticIn *pRet = new CCEaseElasticIn();
		if (pRet)
		{
			if (pRet->initWithAction(pAction))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
Exemplo n.º 4
0
	//
	// EaseBounceInOut
	//
	CCEaseBounceInOut* CCEaseBounceInOut::actionWithAction(CCIntervalAction* pAction)
	{
		CCEaseBounceInOut *pRet = new CCEaseBounceInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
Exemplo n.º 5
0
	CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCIntervalAction *pAction, float fPeriod)
	{
		CCEaseElasticInOut *pRet = new CCEaseElasticInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction, fPeriod))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
Exemplo n.º 6
0
	//
	// EaseOut
	//
	CCEaseOut* CCEaseOut::actionWithAction(cocos2d::CCIntervalAction *pAction, float fRate)
	{
		CCEaseOut *pRet = new CCEaseOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction, fRate))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet;      
	}
Exemplo n.º 7
0
	//
	// EaseExponentialInOut
	//
	CCEaseExponentialInOut* CCEaseExponentialInOut::actionWithAction(cocos2d::CCIntervalAction *pAction)
	{
		CCEaseExponentialInOut *pRet = new CCEaseExponentialInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
Exemplo n.º 8
0
CCTargetedTouchHandler* CCTargetedTouchHandler::handlerWithDelegate(CCTouchDelegate *pDelegate, int nPriority, bool bSwallow)
{
	CCTargetedTouchHandler *pHandler = new CCTargetedTouchHandler();
	if (pHandler)
	{
		if (pHandler->initWithDelegate(pDelegate, nPriority, bSwallow))
		{
			pHandler->autorelease();
		}
		else
		{
			CCX_SAFE_RELEASE_NULL(pHandler);
		}
	}

	return pHandler;
}
UIAccelerometerHandler* UIAccelerometerHandler::handlerWithDelegate(UIAccelerometerDelegate *pDelegate)
{
    UIAccelerometerHandler* pHandler = new UIAccelerometerHandler;

    if (pHandler)
    {
        if (pHandler->initWithDelegate(pDelegate))
        {
            pHandler->autorelease();
        }
        else
        {
            CCX_SAFE_RELEASE_NULL(pHandler);
        }
    }

    return pHandler;
}
Exemplo n.º 10
0
	CCTwirl* CCTwirl::actionWithPosition(cocos2d::CGPoint pos, int t, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCTwirl *pAction = new CCTwirl();

		if (pAction)
		{
			if (pAction->initWithPosition(pos, t, amp, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 11
0
	CCWaves* CCWaves::actionWithWaves(int wav, float amp, bool h, bool v, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCWaves *pAction = new CCWaves();

		if (pAction)
		{
			if (pAction->initWithWaves(wav, amp, h, v, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 12
0
	CCShaky3D* CCShaky3D::actionWithRange(int range, bool shakeZ, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCShaky3D *pAction = new CCShaky3D();

		if (pAction)
		{
			if (pAction->initWithRange(range, shakeZ, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 13
0
	// implementation of CCFadeOutDownTiles
	CCFadeOutDownTiles* CCFadeOutDownTiles::actionWithSize(cocos2d::ccGridSize gridSize, cocos2d::ccTime time)
	{
		CCFadeOutDownTiles *pAction = new CCFadeOutDownTiles();

		if (pAction)
		{
			if (pAction->initWithSize(gridSize, time))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 14
0
	CCFlipY3D* CCFlipY3D::actionWithDuration(ccTime duration)
	{
		CCFlipY3D *pAction = new CCFlipY3D();

		if (pAction)
		{
			if (pAction->initWithSize(ccg(1, 1), duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 15
0
CCKeypadHandler* CCKeypadHandler::handlerWithDelegate(CCKeypadDelegate *pDelegate)
{
    CCKeypadHandler* pHandler = new CCKeypadHandler;

    if (pHandler)
    {
        if (pHandler->initWithDelegate(pDelegate))
        {
            pHandler->autorelease();
        }
        else
        {
            CCX_SAFE_RELEASE_NULL(pHandler);
        }
    }

    return pHandler;
}
Exemplo n.º 16
0
	CCTurnOffTiles* CCTurnOffTiles::actionWithSeed(int s, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCTurnOffTiles *pAction = new CCTurnOffTiles();

		if (pAction)
		{
			if (pAction->initWithSeed(s, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 17
0
	CCSplitCols* CCSplitCols::actionWithCols(int nCols, cocos2d::ccTime duration)
	{
		CCSplitCols *pAction = new CCSplitCols();

		if (pAction)
		{
			if (pAction->initWithCols(nCols, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 18
0
	CCJumpTiles3D* CCJumpTiles3D::actionWithJumps(int j, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCJumpTiles3D *pAction = new CCJumpTiles3D();

		if (pAction)
		{
			if (pAction->initWithJumps(j, amp, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 19
0
	CCRipple3D* CCRipple3D::actionWithPosition(cocos2d::CGPoint pos, float r, int wav, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCRipple3D *pAction = new CCRipple3D();

		if (pAction)
		{
			if (pAction->initWithPosition(pos, r, wav, amp, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;
	}
Exemplo n.º 20
0
	CCShatteredTiles3D* CCShatteredTiles3D::actionWithRange(int nRange, bool bShatterZ, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
	{
		CCShatteredTiles3D *pAction = new CCShatteredTiles3D();

		if (pAction)
		{
			if (pAction->initWithRange(nRange, bShatterZ, gridSize, duration))
			{
				pAction->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pAction);
			}
		}

		return pAction;	
	}
Exemplo n.º 21
0
void CCSpriteFrameCache::purgeSharedSpriteFrameCache(void)
{
	CCX_SAFE_RELEASE_NULL(pSharedSpriteFrameCache);
}
Exemplo n.º 22
0
	void CCAnimationCache::purgeSharedAnimationCache(void)
	{
        CCX_SAFE_RELEASE_NULL(s_pSharedAnimationCache);
	}