I need to divide a scene in to two layers. So that I can write same methods for two layers. So I may get two functionalities. But ca开发者_开发技巧n I make that ? Is there a possibility in cocos2d? Thank You
Just create two different layer classes and add instances of each to your scene.
CCScene *scene = [MyScene node];
[scene addChild:[MyFirstLayer node]];
[scene addChild:[MySecondLayer node]];
精彩评论