// // JumpTo // CCJumpTo* CCJumpTo::actionWithDuration(ccTime duration, const CCPoint& position, ccTime height, int jumps) { CCJumpTo *pJumpTo = new CCJumpTo(); pJumpTo->initWithDuration(duration, position, height, jumps); pJumpTo->autorelease(); return pJumpTo; }
// // JumpTo // CCJumpTo* CCJumpTo::create(float duration, const CCPoint& position, float height, int jumps) { CCJumpTo *pJumpTo = new CCJumpTo(); pJumpTo->initWithDuration(duration, position, height, jumps); pJumpTo->autorelease(); return pJumpTo; }
CCObject* CCJumpTo::copyWithZone(CCZone* pZone) { CCZone* pNewZone = NULL; CCJumpTo* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCJumpTo*)(pZone->m_pCopyObject); } else { pCopy = new CCJumpTo(); pZone = pNewZone = new CCZone(pCopy); } CCJumpBy::copyWithZone(pZone); pCopy->initWithDuration(m_fDuration, m_delta, m_height, m_nJumps); CC_SAFE_DELETE(pNewZone); return pCopy; }