iphoneioscocos2d-iphonekobold2d

Kobold2d and Cocos Builder: setting start scene


In Kobold2d certain functions that in Cocos2d is in the appDelegate is in a config.lua file. And this brings me to the problem cause to initialize a Cocos Builder as the first scene in cocos2d you replace this line (in the app delegate)

[director runWithScene: [IntroLayer scene]];

with

[director runWithScene: [CCBReader sceneWithNodeGraphFromFile:@"MainMenuScene.ccbi"]];

but this is all hidden away in Kobold2d - replaced by FirstSceneClassName = "HelloWorldLayer" in the config.lua file.

Anyone knows a bugfree way around this?


Solution

  • You can still use runWithScene, just put it in AppDelegate's initializationComplete method. This will take precedence over loading the scene specified in config.lua.