Changed Transform Update order

This commit is contained in:
Simon Lübeß
2024-02-26 13:47:29 +01:00
parent 19ee9bee89
commit 0a8d83ffb6
+7 -6
View File
@@ -701,6 +701,7 @@ namespace GlitchyEngine.World
} }
// TODO: Execute Fixed-Updates // TODO: Execute Fixed-Updates
TransformSystem.Update(_ecsWorld);
} }
} }
@@ -754,13 +755,18 @@ namespace GlitchyEngine.World
{ {
Debug.Profiler.ProfileRendererFunction!(); Debug.Profiler.ProfileRendererFunction!();
TransformSystem.Update(_ecsWorld); if (mode.HasFlag(.Physics))
{
UpdatePhysics(gameTime);
}
if (mode.HasFlag(.Scripts)) if (mode.HasFlag(.Scripts))
{ {
UpdateScripts(gameTime, mode); UpdateScripts(gameTime, mode);
} }
TransformSystem.Update(_ecsWorld);
if (!_destroyScriptQueue.IsEmpty) if (!_destroyScriptQueue.IsEmpty)
{ {
for (let scriptInstance in _destroyScriptQueue) for (let scriptInstance in _destroyScriptQueue)
@@ -784,11 +790,6 @@ namespace GlitchyEngine.World
_destroyQueue.Clear(); _destroyQueue.Clear();
} }
if (mode.HasFlag(.Physics))
{
UpdatePhysics(gameTime);
}
} }
/// Creates a new Entity with the given name. /// Creates a new Entity with the given name.