SHADE_Y3/SHADE_Engine/src/ECS_Base/System/SHFixedSystemRoutine.cpp

21 lines
371 B
C++

#include "SHpch.h"
#include "SHFixedSystemRoutine.h"
#include "../SHECSMacros.h"
namespace SHADE
{
void SHFixedSystemRoutine::Execute(double dt) noexcept
{
accumulatedTime += dt;
int counter = 0;
while (accumulatedTime >= fixedTimeStep)
{
++counter;
accumulatedTime -= fixedTimeStep;
FixedExecute(fixedTimeStep);
}
stats.numSteps = counter;
}
}