MCPcopy Create free account
hub / github.com/antopilo/Nuake / FixedUpdate

Method FixedUpdate

Nuake/Source/Nuake/Scene/Systems/ScriptingSystem.cpp:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 void ScriptingSystem::FixedUpdate(Timestep ts)
148 {
149 if (!Engine::IsPlayMode())
150 return;
151
152 auto& scriptingEngineNet = ScriptingEngineNet::Get();
153 auto netEntities = m_Scene->m_Registry.view<NetScriptComponent>();
154 for (auto& e : netEntities)
155 {
156 NetScriptComponent& netScriptComponent = netEntities.get<NetScriptComponent>(e);
157
158 if (netScriptComponent.ScriptPath.empty())
159 continue;
160
161 auto entity = Entity{ e, m_Scene };
162 auto scriptInstance = scriptingEngineNet.GetEntityScript(entity);
163 scriptInstance->InvokeMethod("OnFixedUpdate", ts.GetSeconds());
164 }
165 }
166
167 void ScriptingSystem::Exit()
168 {

Callers

nothing calls this directly

Calls 3

GetEntityScriptMethod · 0.80
GetSecondsMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected