// // EaseInOut // EaseInOut* EaseInOut::create(ActionInterval *action, float rate) { EaseInOut *easeInOut = new (std::nothrow) EaseInOut(); if (easeInOut && easeInOut->initWithAction(action, rate)) { easeInOut->autorelease(); return easeInOut; } delete easeInOut; return nullptr; }
// // EaseInOut // EaseInOut* EaseInOut::create(ActionInterval *action, float rate) { EaseInOut *easeInOut = new (std::nothrow) EaseInOut(); if (easeInOut) { if (easeInOut->initWithAction(action, rate)) { easeInOut->autorelease(); } else { CC_SAFE_RELEASE_NULL(easeInOut); } } return easeInOut; }
// // EaseInOut // EaseInOut* EaseInOut::create(ActionInterval *pAction, float fRate) { EaseInOut *pRet = new EaseInOut(); if (pRet) { if (pRet->initWithAction(pAction, fRate)) { pRet->autorelease(); } else { CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
Object* EaseInOut::copyWithZone(Zone *pZone) { Zone* pNewZone = NULL; EaseInOut* pCopy = NULL; if(pZone && pZone->_copyObject) { //in case of being called at sub class pCopy = (EaseInOut*)(pZone->_copyObject); } else { pCopy = new EaseInOut(); pNewZone = new Zone(pCopy); } pCopy->initWithAction((ActionInterval*)(_inner->copy()->autorelease()), _rate); CC_SAFE_DELETE(pNewZone); return pCopy; }