MCPcopy Create free account
hub / github.com/cocos/cocos-engine / init

Method init

native/tests/sebind-tests/common/Classes/Game.cpp:41–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39Game::Game() = default;
40
41int Game::init() {
42 _windowInfo.title = GAME_NAME;
43 // configurate window size
44 // _windowInfo.height = 600;
45 // _windowInfo.width = 800;
46
47#if CC_DEBUG
48 _debuggerInfo.enabled = true;
49#else
50 _debuggerInfo.enabled = false;
51#endif
52 _debuggerInfo.port = 6086;
53 _debuggerInfo.address = "0.0.0.0";
54 _debuggerInfo.pauseOnStart = false;
55
56 _xxteaKey = SCRIPT_XXTEAKEY;
57 auto *seengine = se::ScriptEngine::getInstance();
58 seengine->addRegisterCallback(jsb_register_fruits);
59 seengine->addAfterCleanupHook([]() { sebind::reset(); });
60
61 BaseGame::init();
62 return 0;
63}
64
65void Game::onPause() {
66 BaseGame::onPause();

Callers

nothing calls this directly

Calls 4

resetFunction · 0.50
initFunction · 0.50
addRegisterCallbackMethod · 0.45
addAfterCleanupHookMethod · 0.45

Tested by

no test coverage detected