コード例 #1
0
ファイル: EasyEffect.cpp プロジェクト: huangshucheng/MyUtil
	static CCFiniteTimeAction* create(float t)
	{
		CCFlipX3D* flipx  = CCFlipX3D::create(t);
		CCActionInterval* flipx_back = flipx->reverse();
		CCDelayTime* delay = CCDelayTime::create(2);

		return CCSequence::create(flipx, delay, flipx_back, NULL);
	}
コード例 #2
0
ファイル: EffectsTest.cpp プロジェクト: geniikw/myFirst2DGame
	static CCActionInterval* actionWithDuration(ccTime t)
	{
		CCFlipX3D* flipx  = CCFlipX3D::actionWithDuration(t);
		CCActionInterval* flipx_back = flipx->reverse();
		CCDelayTime* delay = CCDelayTime::actionWithDuration(2);
		
		return (CCActionInterval*)(CCSequence::actions(flipx, delay, flipx_back, NULL));
	}
コード例 #3
0
	CCFlipX3D* CCFlipX3D::actionWithDuration(ccTime duration)
	{
		CCFlipX3D *pAction = new CCFlipX3D();

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

		return pAction;
	}
コード例 #4
0
CCFlipX3D* CCFlipX3D::create(float duration)
{
    CCFlipX3D *pAction = new CCFlipX3D();

    if (pAction)
    {
        if (pAction->initWithDuration(duration))
        {
            pAction->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pAction);
        }
    }

    return pAction;
}
コード例 #5
0
	CCObject* CCFlipX3D::copyWithZone(CCZone *pZone)
	{
		CCZone* pNewZone = NULL;
		CCFlipX3D* pCopy = NULL;
		if(pZone && pZone->m_pCopyObject) 
		{
			//in case of being called at sub class
			pCopy = (CCFlipX3D*)(pZone->m_pCopyObject);
		}
		else
		{
			pCopy = new CCFlipX3D();
			pZone = pNewZone = new CCZone(pCopy);
		}

		CCGrid3DAction::copyWithZone(pZone);

		pCopy->initWithSize(m_sGridSize, m_fDuration);

		CC_SAFE_DELETE(pNewZone);
		return pCopy;
	}