Esempio n. 1
0
	static CCActionInterval* actionWithDuration(ccTime t)
	{
		CCTurnOffTiles* fadeout = CCTurnOffTiles::actionWithSeed(25, ccg(48,32) , t);
		CCActionInterval* back = fadeout->reverse();
		CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f);

		return (CCActionInterval*)(CCSequence::actions(fadeout, delay, back, NULL));
	}
Esempio n. 2
0
    static CCActionInterval* create(float t)
    {
        CCTurnOffTiles* fadeout = CCTurnOffTiles::create(t, CCSizeMake(48,32), 25);
        CCActionInterval* back = fadeout->reverse();
        CCDelayTime* delay = CCDelayTime::create(0.5f);

        return CCSequence::create(fadeout, delay, back, NULL);
    }
Esempio n. 3
0
    static CCActionInterval* create(float t)
    {
        CCTurnOffTiles* fadeout = CCTurnOffTiles::create(25, ccg(48,32) , t);
        CCActionInterval* back = fadeout->reverse();
        CCDelayTime* delay = CCDelayTime::create(0.5f);

        return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
    }
Esempio n. 4
0
CCTurnOffTiles* CCTurnOffTiles::create(float duration, const CCSize& gridSize)
{
    CCTurnOffTiles* pAction = new CCTurnOffTiles();
    if (pAction->initWithDuration(duration, gridSize, 0))
    {
        pAction->autorelease();
    }
    else
    {
        CC_SAFE_RELEASE_NULL(pAction);
    }
    return pAction;
}
// implementation of TurnOffTiles
CCTurnOffTiles* CCTurnOffTiles::actionWithSize(const ccGridSize& size, ccTime d)
{
    CCTurnOffTiles* pAction = new CCTurnOffTiles();
    if (pAction->initWithSize(size, d))
    {
        pAction->autorelease();
    }
    else
    {
        CC_SAFE_RELEASE_NULL(pAction);
    }
    return pAction;
}
CCTurnOffTiles* CCTurnOffTiles::actionWithSeed(int s, const ccGridSize& gridSize, ccTime duration)
{
    CCTurnOffTiles *pAction = new CCTurnOffTiles();

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

    return pAction;
}
CCTurnOffTiles* CCTurnOffTiles::create(float duration, const CCSize& gridSize, unsigned int seed)
{
    CCTurnOffTiles *pAction = new CCTurnOffTiles();

    if (pAction)
    {
        if (pAction->initWithDuration(duration, gridSize, seed))
        {
            CC_SAFE_AUTORELEASE(pAction);
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pAction);
        }
    }

    return pAction;
}
Esempio n. 8
0
CCObject* CCTurnOffTiles::copyWithZone(CCZone *pZone)
{
    CCZone* pNewZone = NULL;
    CCTurnOffTiles* pCopy = NULL;
    if(pZone && pZone->m_pCopyObject) 
    {
        pCopy = (CCTurnOffTiles*)(pZone->m_pCopyObject);
    }
    else
    {
        pCopy = new CCTurnOffTiles();
        pZone = pNewZone = new CCZone(pCopy);
    }

    CCTiledGrid3DAction::copyWithZone(pZone);

    pCopy->initWithDuration(m_fDuration, m_sGridSize, m_nSeed );

    CC_SAFE_DELETE(pNewZone);
    return pCopy;
}
	NSObject* CCTurnOffTiles::copyWithZone(cocos2d::NSZone *pZone)
	{
		NSZone* pNewZone = NULL;
		CCTurnOffTiles* pCopy = NULL;
		if(pZone && pZone->m_pCopyObject) 
		{
			pCopy = (CCTurnOffTiles*)(pZone->m_pCopyObject);
		}
		else
		{
			pCopy = new CCTurnOffTiles();
			pZone = pNewZone = new NSZone(pCopy);
		}

		CCTiledGrid3DAction::copyWithZone(pZone);

		pCopy->initWithSeed(m_nSeed, m_sGridSize, m_fDuration);

		CCX_SAFE_DELETE(pNewZone);
		return pCopy;
	}