开发者

Couple of questions about Cocos2d and iPhone?

开发者 https://www.devze.com 2023-01-12 20:22 出处:网络
1- is it possible to use interface builder to d开发者_Python百科esign the game background and then use code to add cocos2d objects?

1- is it possible to use interface builder to d开发者_Python百科esign the game background and then use code to add cocos2d objects?

2- Is it possible to use iphone UI objects as well as cocos2d objects, for example uibutton, uiScrollView, etc.

3- is it possible to useiphone default template, and cocos2d templates togather? for example my home screen is a simple viewcontroller which is loading from a xib file, but the actual game page is a cocos2d template, which has no xib file, and the navigate between them?


The call [[CCDirector sharedDirector] openGLView] will return the UIView that cocos2d is operating within. (It will be an EAGLView.) You can do what you will with that view in the UIKit world. Note, though, that there can be significant performance implications, and that UIKit views have no visibility in cocos2d in terms of cocos2d animation, physics integration, etc.


1: No. In Interface Builder you can only design UIKit objects.

2: Yes.

3: Yes.

0

精彩评论

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