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 can I make that ? Is there a possibility in cocos2d? Thank You
A:
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]];
Frank Mitchell
2010-07-08 21:07:20
@Frank Mitchell, After adding the two layers should we use z tags to determine which is on top of the other ? Or can I divide the two layers by coordinates(some part of screen to MyFirstLayer and remaining part to MySecond Layer).Thank You.
srikanth rongali
2010-07-14 04:26:54