CCProgressFromTo* CCProgressFromTo::create(float duration, float fFromPercentage, float fToPercentage) { CCProgressFromTo *pProgressFromTo = new CCProgressFromTo(); pProgressFromTo->initWithDuration(duration, fFromPercentage, fToPercentage); pProgressFromTo->autorelease(); return pProgressFromTo; }
CCObject* CCProgressFromTo::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCProgressFromTo* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCProgressFromTo*)(pZone->m_pCopyObject); } else { pCopy = new CCProgressFromTo(); pZone = pNewZone = new CCZone(pCopy); } CCActionInterval::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_fFrom, m_fTo); CC_SAFE_DELETE(pNewZone); return pCopy; }