| 258 | } |
| 259 | |
| 260 | void 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 | |
| 279 | void ScriptManager::callOnCreate(ScriptRef p_ScriptRef, |
| 280 | Dod::Ref p_ScriptCompRef) |
nothing calls this directly
no outgoing calls
no test coverage detected