mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added single step for simulation and play mode
+ Added ManualStepTime to GameTime
This commit is contained in:
@@ -48,7 +48,7 @@ namespace GlitchyEngine
|
||||
let sw = append Stopwatch(startNow);
|
||||
_stopwatch = sw;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Starts or continues the internal timer.
|
||||
*/
|
||||
@@ -98,5 +98,16 @@ namespace GlitchyEngine
|
||||
|
||||
_frameCount++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells the timer that a frame has passed and updates the counters according to the given time step.
|
||||
*/
|
||||
public void ManualStepFrame(float deltaTimeSeconds)
|
||||
{
|
||||
_frameTime = TimeSpan.FromSeconds(deltaTimeSeconds);
|
||||
_totalTime += _frameTime;
|
||||
|
||||
_frameCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user