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

21 lines
371 B
C++
Raw Normal View History

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