MCPcopy Create free account
hub / github.com/defold/defold / TimerInitializeScriptInstance

Function TimerInitializeScriptInstance

engine/script/src/script_timer.cpp:476–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474 }
475
476 static void TimerInitializeScriptInstance(HScriptWorld script_world)
477 {
478 HContext context = GetScriptWorldContext(script_world);
479 lua_State* L = GetLuaState(context);
480 DM_LUA_STACK_CHECK(L, 0);
481
482 lua_pushinteger(L, (lua_Integer)TIMER_WORLD_VALUE_KEY_HASH);
483 HTimerWorld timer_world = GetTimerWorld(script_world);
484 lua_pushlightuserdata(L, timer_world);
485 SetInstanceContextValue(L);
486 }
487
488 static void TimerFinalizeScriptInstance(HScriptWorld script_world)
489 {

Callers

nothing calls this directly

Calls 6

GetScriptWorldContextFunction · 0.85
lua_pushintegerFunction · 0.85
GetTimerWorldFunction · 0.85
lua_pushlightuserdataFunction · 0.85
SetInstanceContextValueFunction · 0.85
GetLuaStateFunction · 0.70

Tested by

no test coverage detected