Game object with composition and CCSpriteBatchNode
问题 I'm currently developing a game with cocos2d and box2d on iPhone. I read a lot of articles concerning game code organization, game objects structure etc. I first started developing my game objects by inheriting from a base class itself inheriting from CCSprite. I had a CCSpriteBatchNode to draw all the game items, which the player can interact with, in one draw call. This was easy because my Item class indirectly inherit from CCSprite so I could easily add my items to the CCSpriteBatchNode.