void GameScene::showGo() { CCSprite* goSprite = CCSprite::create("go.png"); goSprite->setPosition(ccp(320,568)); this->addChild(goSprite); CCScaleTo* scaleBig = CCScaleTo::create(0.5f,1); CCScaleTo* scaleSmall = CCScaleTo::create(0.0001f,0); CCEaseBounceOut* eff = CCEaseBounceOut::create(scaleBig); eff->bounceTime(3); CCSequence* act = CCSequence::create(CCHide::create(),scaleSmall,CCShow::create(),eff,CCDelayTime::create(0.2),CCScaleTo::create(0.5,0),CCRemoveSelf::create(),NULL); goSprite->setVisible(false); goSprite->runAction(act); }
CCEaseBounceOut* CCEaseBounceOut::create ( CCActionInterval* pAction ) { CCEaseBounceOut* pRet = new CCEaseBounceOut ( ); if ( pRet && pRet->initWithAction ( pAction ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }
// // EaseBounceOut // CCEaseBounceOut* CCEaseBounceOut::actionWithAction(CCIntervalAction* pAction) { CCEaseBounceOut *pRet = new CCEaseBounceOut(); if (pRet) { if (pRet->initWithAction(pAction)) { pRet->autorelease(); } else { CCX_SAFE_RELEASE_NULL(pRet); } } return pRet; }
NSObject* CCEaseBounceOut::copyWithZone(cocos2d::NSZone *pZone) { NSZone* pNewZone = NULL; CCEaseBounceOut* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCEaseBounceOut*)(pZone->m_pCopyObject); } else { pCopy = new CCEaseBounceOut(); pZone = pNewZone = new NSZone(pCopy); } pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease())); CCX_SAFE_DELETE(pNewZone); return pCopy; }
CCObject* CCEaseBounceOut::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; CCEaseBounceOut* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (CCEaseBounceOut*)(pZone->m_pCopyObject); } else { pCopy = new CCEaseBounceOut(); pNewZone = new CCZone(pCopy); } pCopy->initWithAction((CCActionInterval *)(m_pInner->copy()->autorelease())); CC_SAFE_DELETE(pNewZone); return pCopy; }