开发者

Can I divide a scene into two layers of equal sizes?

开发者 https://www.devze.com 2022-12-26 15:34 出处:网络
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?

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]];
0

精彩评论

暂无评论...
验证码 换一张
取 消