读书人

iphone-cocos2d中Scene应用

发布时间: 2012-09-04 14:19:30 作者: rapoo

iphone-cocos2d中Scene使用

?

在应用程序启动的方法:

- (void) applicationDidFinishLaunching:(UIApplication*)application

[[CCDirector sharedDirector] runWithScene: [HelloWorld scene]];?

?来加载一个场景,替换场景使用:

???[[CCDirector sharedDirector] replaceScene: [SomeOtherScene scene]];

?

?使用动画方式来替换场景:

??[[CCDirector sharedDirector] replaceScene:

 [CCTransitionFade transitionWithDuration:0.5f scene:[SomeOtherScene scene]]];

读书人网 >操作系统

热点推荐