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
}
精彩评论