您的位置:首页 > 移动开发 > Cocos引擎

cocos2d从初学之(1.01之后创建一个HellowWord碰到的几个问题)

2012-02-13 00:11 441 查看
好吧,我是一个菜鸟。做了一年的ios金融应用。发现应用实在不适合我。于是果断辞掉银行的工作来到一个小工作室,完成我一直想做游戏的梦想。

第一个问题

新版本里面的摒弃了原来的

CCLabel

这个用来做游戏标签的对象。

以后调用这个对象都会改为

CCLabelTTF

给一段示例代码说明一切吧

CCLabelTTF *titleLeft = [CCLabelTTF
labelWithString:@"Menu "
fontName:@"Marker Felt"
fontSize:48];

第二个
是如何控制游戏界面横屏,还是竖屏的方法也有大改变

要在RootController.h这个类里面的修改


#elif GAME_AUTOROTATION == kGameAutorotationUIViewController
//
// EAGLView will be rotated by the UIViewController
//
// Sample: Autorotate only in landscpe mode
//
// return YES for the supported orientations

return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );

里面的

return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );横屏

替换后

return ( UIInterfaceOrientationIsPortrait( interfaceOrientation ) );

为竖屏
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: