在应用程序启动的方法:
- (void) applicationDidFinishLaunching:(UIApplication*)application
中调用
[[CCDirector sharedDirector] runWithScene: [HelloWorld scene]];
来加载一个场景,替换场景使用:
[[CCDirector sharedDirector] replaceScene: [SomeOtherScene scene]];
使用动画方式来替换场景:
[[CCDirector sharedDirector] replaceScene:
[CCTransitionFade transitionWithDuration:0.5f scene:[SomeOtherScene scene]]];