CCAnimate* CCAnimate::actionWithDuration(ccTime duration, CCAnimation *pAnimation, bool bRestoreOriginalFrame) { CCAnimate *pAnimate = new CCAnimate(); pAnimate->initWithDuration(duration, pAnimation, bRestoreOriginalFrame); pAnimate->autorelease(); return pAnimate; }
CCObject* CCAnimate::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCAnimate* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCAnimate*)(pZone->m_pCopyObject); } else { pCopy = new CCAnimate(); pZone = pNewZone = new CCZone(pCopy); } CCActionInterval::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_pAnimation, m_bRestoreOriginalFrame); CC_SAFE_DELETE(pNewZone); return pCopy; }