structure adjustments (#3532)

This commit is contained in:
Yun Hsiao Wu
2021-06-02 09:39:13 +08:00
committed by GitHub
parent a6d3d415a5
commit 1ebe420662
73 changed files with 1152 additions and 1127 deletions
@@ -48,7 +48,7 @@ Game::~Game()
bool Game::init()
{
cc::Application::init();
se::ScriptEngine *se = se::ScriptEngine::getInstance();
@@ -56,13 +56,13 @@ bool Game::init()
Application::getInstance()->setPreferredFramesPerSecond(60);
jsb_init_file_operation_delegate();
jsb_register_all_modules();
auto parser = ConfigParser::getInstance();
#if defined(CC_DEBUG) && (CC_DEBUG > 0)
// Enable debugger here
jsb_enable_debugger("0.0.0.0", 5086, parser->isWaitForConnect());
#endif
se->start();
auto runtimeEngine = RuntimeEngine::getInstance();
@@ -74,11 +74,7 @@ bool Game::init()
se::AutoHandleScope hs;
jsb_run_script("jsb-adapter/jsb-builtin.js");
jsb_run_script("main.js");
se->addAfterCleanupHook([]() {
JSBClassType::destroy();
});
// Runtime end
CC_LOG_DEBUG("iShow!");
return true;