MCPcopy Create free account
hub / github.com/begla/Intrinsic / callTickScript

Method callTickScript

IntrinsicCore/src/IntrinsicCoreResourcesScript.cpp:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void ScriptManager::callTickScript(ScriptRef p_ScriptRef,
261 Dod::Ref p_ScriptCompRef, float p_DeltaT)
262{
263 sol::optional<sol::function> func =
264 _luaState["methods"]["tick"][(uint32_t)p_ScriptRef._id];
265 if (func)
266 {
267 bool success = false;
268 SOL_PROTECTED_EXEC(
269 (*func)(Components::ScriptManager::_entity(p_ScriptCompRef), p_DeltaT),
270 success);
271
272 if (!success)
273 {
274 destroyResources(p_ScriptRef);
275 }
276 }
277}
278
279void ScriptManager::callOnCreate(ScriptRef p_ScriptRef,
280 Dod::Ref p_ScriptCompRef)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected