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

20 lines
343 B
C++
Raw Normal View History

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