Hey, I've used a CCNode as the base for my game objects. Then I have CCSprite(s) as member objects, so that they can be assigned various graphic elements, but the subclassed CCNode acts as a container for everything.
My problem arises from integrating CCSpriteBatchNode. Since the CCSprites are added as children of the batch node and not the CCNode (the only attachment is the batch node is added to CCNode using useBatchNode), I'm having trouble animating the CCNode, i.e. with actions. I override the position methods in the CCNode to apply position changes to my CCSprite(s). When I try to use runAction on the CCNode (e.g. trying to move it from position A to position B) but nothing happens. The CCSprites don't move anywhere. I didn't have this issue before when the sprites were children of the node. But now since they are children of the batchnode, animating the node and sprites as a unit is not working.
Does anyone have a suggestion on how to solve this issue or a better way to setup "game objects"?
Note: I tried overriding the runAction method in CCNode and applying the action to the CCSprites. This did animate the sprites however, an error was generated because the callback function failed since it was calling a method in the layer not in the ccnode.