CCSpawn* CCSpawn::actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2) { CCSpawn *pSpawn = new CCSpawn(); pSpawn->initOneTwo(pAction1, pAction2); pSpawn->autorelease(); return pSpawn; }
CCObject* CCSpawn::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCSpawn* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCSpawn*)(pZone->m_pCopyObject); } else { pCopy = new CCSpawn(); pZone = pNewZone = new CCZone(pCopy); } CCActionInterval::copyWithZone(pZone); pCopy->initOneTwo((CCFiniteTimeAction*)(m_pOne->copy()->autorelease()), (CCFiniteTimeAction*)(m_pTwo->copy()->autorelease())); CC_SAFE_DELETE(pNewZone); return pCopy; }