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