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); }
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)); }
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; }
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; }
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; }