m_emitter->runAction(

cocos2d::CCSequence::actions(

cocos2d::CCMoveTo::actionWithDuration(0.2f, dst->getPosition()),

cocos2d::CCDelayTime::actionWithDuration(3.0f),

cocos2d::CCBlink::create(2.0f, 1),

NULL

)

);


이런식으로 action에서 CCDelayTime과 CCBlink을 이용해서 객체를 제거해주었다.


-----------------------------------------------------------------------------------------


m_emitter->runAction(

cocos2d::CCSequence::actions(

cocos2d::CCMoveTo::actionWithDuration(0.2f, dst->getPosition()),

cocos2d::CCDelayTime::actionWithDuration(3.0f),

cocos2d::CCCallFuncN::create(

this, (cocos2d::SEL_CallFuncN)(&CMissile::destroy)

),

NULL

)

);


다음과 같이 제거한다.

Posted by Нуеоп