开发者

SubViews with Cocos2d

I have a helloworld scene that I would like to add a subview to.

How is this done in cocos2d? I want to add a subview near the lower part of screen.

I want this view to be controlled by the helloworld scene, hiding and showing the subview as needed.

How is this done in cocos2d?

Thank开发者_高级运维s


Add the subview (probably CCLayer) as a child to the hello world scene.

CCLayer* subview = //initialize
[subview setPosition:ccp(X,Y)];

[self addChild:subview];


You can add a CCLayer as a child to the CCScene or to the main CCLayer inside of it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜