// // MoveBy // CCMoveBy* CCMoveBy::actionWithDuration(ccTime duration, const CCPoint& position) { CCMoveBy *pMoveBy = new CCMoveBy(); pMoveBy->initWithDuration(duration, position); pMoveBy->autorelease(); return pMoveBy; }
// // MoveBy // CCMoveBy* CCMoveBy::create(float duration, const CCPoint& position) { CCMoveBy *pMoveBy = new CCMoveBy(); pMoveBy->initWithDuration(duration, position); pMoveBy->autorelease(); return pMoveBy; }
// // MoveBy // CCMoveBy* CCMoveBy::actionWithDuration(cocos2d::ccTime duration, cocos2d::CGPoint position) { CCMoveBy *pMoveBy = new CCMoveBy(); pMoveBy->initWithDuration(duration, position); pMoveBy->autorelease(); return pMoveBy; }
CCObject* CCMoveBy::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCMoveBy* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCMoveBy*)(pZone->m_pCopyObject); } else { pCopy = new CCMoveBy(); pZone = pNewZone = new CCZone(pCopy); } CCMoveTo::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_delta); CC_SAFE_DELETE(pNewZone); return pCopy; }
CCMoveBy* CCMoveBy::create(float duration, const CCPoint& deltaPosition){ CCMoveBy *ret = new CCMoveBy; ret->initWithDuration(duration, deltaPosition); return ret; }