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

Function TimerNewScriptWorld

engine/script/src/script_timer.cpp:440–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438 }
439
440 static void TimerNewScriptWorld(HScriptWorld script_world)
441 {
442 assert(script_world != 0x0);
443 HContext context = GetScriptWorldContext(script_world);
444 assert(context != 0x0);
445 lua_State* L = context->m_LuaState;
446 assert(L != 0x0);
447 DM_LUA_STACK_CHECK(L, 0);
448
449 HTimerWorld timer_world = NewTimerWorld();
450 lua_pushinteger(L, (lua_Integer)TIMER_WORLD_VALUE_KEY_HASH);
451 lua_pushlightuserdata(L, timer_world);
452 SetScriptWorldContextValue(script_world);
453 }
454
455 static void TimerDeleteScriptWorld(HScriptWorld script_world)
456 {

Callers

nothing calls this directly

Calls 6

GetScriptWorldContextFunction · 0.85
NewTimerWorldFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushlightuserdataFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected