Exemplo n.º 1
0
	CCTwirl* CCTwirl::actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize, ccTime duration)
	{
		CCTwirl *pAction = new CCTwirl();

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

		return pAction;
	}
Exemplo n.º 2
0
CCTwirl* CCTwirl::create(float duration, const CCSize& gridSize, CCPoint position, unsigned int twirls, float amplitude)
{
    CCTwirl *pAction = new CCTwirl();

    if (pAction)
    {
        if (pAction->initWithDuration(duration, gridSize, position, twirls, amplitude))
        {
            pAction->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pAction);
        }
    }

    return pAction;
}