开发者

Calling method at the end of sprite animation in cocos2d

Can 开发者_运维技巧anybody tell me how to call a method at the end of the sprite animation. I want the last image to be removed from the scene. Thats why i want to call that method. If there is any better way to do that please tell me.


Add this to the end of your CCSequence:

CCCallFuncO* removeMe = [CCCallFuncO actionWithTarget:self selector:@selector(removeMe:) object:variableOfObjectToRemove];

Then:

- (void) removeMe:(id)object {
//remove
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜