Nowcalling module events

This commit is contained in:
Antoine Pilote
2025-04-02 16:49:28 -04:00
parent ef70a04da9
commit fff6997dd4
3 changed files with 25 additions and 4 deletions

View File

@@ -5,7 +5,6 @@
#include "Nuake/Physics/PhysicsManager.h"
#include "Nuake/AI/NavManager.h"
#include "Nuake/Audio/AudioManager.h"
#include "Nuake/FileSystem/FileSystem.h"
#include "Nuake/Core/Input.h"
#include "Nuake/Rendering/Renderer.h"
@@ -54,7 +53,6 @@ namespace Nuake
ScriptingEngineNet::Get().OnGameAssemblyLoaded().AddStatic(&Engine::OnScriptingEngineGameAssemblyLoaded);
AudioManager::Get().Initialize();
PhysicsManager::Get().Init();
NavManager::Get().Initialize();
@@ -151,13 +149,17 @@ namespace Nuake
// Fixed update
while (fixedUpdateDifference >= fixedUpdateRate)
{
currentWindow->FixedUpdate(fixedUpdateRate * timeScale);
const float scaledFixedTimestep = fixedUpdateRate * timeScale;
currentWindow->FixedUpdate(scaledFixedTimestep);
Modules::FixedUpdate(scaledFixedTimestep);
fixedUpdateDifference -= fixedUpdateRate;
}
Modules::Update(scaledTimeStep);
Input::Update();
AudioManager::Get().AudioUpdate();
}
}