CCEaseElastic* CCEaseElastic::create ( CCActionInterval* pAction, KDfloat fPeriod ) { CCEaseElastic* pRet = new CCEaseElastic ( ); if ( pRet && pRet->initWithAction ( pAction, fPeriod ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }
CCEaseElastic* CCEaseElastic::actionWithAction(cocos2d::CCIntervalAction *pAction, float fPeriod) { CCEaseElastic *pRet = new CCEaseElastic(); if (pRet) { if (pRet->initWithAction(pAction, fPeriod)) { pRet->autorelease(); } else { CCX_SAFE_RELEASE_NULL(pRet); } } return pRet; }
CCEaseElastic* CCEaseElastic::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/) { CCEaseElastic *pRet = new CCEaseElastic(); if (pRet) { if (pRet->initWithAction(pAction, fPeriod)) { pRet->autorelease(); } else { CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
// // EaseElastic // CCEaseElastic* CCEaseElastic::actionWithAction(CCActionInterval *pAction) { CCEaseElastic *pRet = new CCEaseElastic(); if (pRet) { if (pRet->initWithAction(pAction)) { pRet->autorelease(); } else { CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
NSObject* CCEaseElastic::copyWithZone(cocos2d::NSZone *pZone) { NSZone* pNewZone = NULL; CCEaseElastic* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCEaseElastic*)(pZone->m_pCopyObject); } else { pCopy = new CCEaseElastic(); pZone = pNewZone = new NSZone(pCopy); } pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod); CCX_SAFE_DELETE(pNewZone); return pCopy; }
CCObject* CCEaseElastic::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCEaseElastic* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCEaseElastic*)(pZone->m_pCopyObject); } else { pCopy = new CCEaseElastic(); pNewZone = new CCZone(pCopy); } pCopy->initWithAction((CCActionInterval *)(m_pInner->copy()->autorelease()), m_fPeriod); CC_SAFE_DELETE(pNewZone); return pCopy; }