Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3

This commit is contained in:
pandamicro 2015-08-04 11:22:54 +08:00
commit a8a0516bf4
2 changed files with 13 additions and 7 deletions

View File

@ -152,6 +152,9 @@ bool AppDelegate::applicationDidFinishLaunching()
#endif
sc->start();
sc->runScript("script/jsb_boot.js");
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
sc->enableDebugger();
#endif
ScriptEngineProtocol *engine = ScriptingCore::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(engine);
ScriptingCore::getInstance()->runScript("main.js");

View File

@ -68,13 +68,16 @@ bool AppDelegate::applicationDidFinishLaunching()
jsRuntime->startWithDebugger();
}
#else
js_module_register();
ScriptingCore* sc = ScriptingCore::getInstance();
sc->start();
sc->runScript("script/jsb_boot.js");
ScriptEngineProtocol *engine = ScriptingCore::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(engine);
ScriptingCore::getInstance()->runScript("main.js");
js_module_register();
ScriptingCore* sc = ScriptingCore::getInstance();
sc->start();
sc->runScript("script/jsb_boot.js");
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
sc->enableDebugger();
#endif
ScriptEngineProtocol *engine = ScriptingCore::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(engine);
ScriptingCore::getInstance()->runScript("main.js");
#endif
return true;