I'm working in a Cocos2D scene where I have a pack of sprites added as children in a GameScene that inherits from CCLayer. When I want to change the whole scene I know that I can remove all children with this line (if I'm not wrong, which also can be):
However how can I remove a single sprite at a certain point of the game? I've tried the following but it doesn't work:
// myObject is a custom class that contains a pointer to it's sprite
[self removeChild:myObject.sprite cleanup:YES];
I think it should be something like what I've done, but what?