Add Configurable stepsPerSecond for engine logic

This commit is contained in:
Marty Oehme 2018-08-25 15:51:17 +02:00
parent 588a3ad2a0
commit 905af769f6

View file

@ -8,6 +8,8 @@ class Engine {
// Game Tick Rate - *does* impact game speed TODO add configurable option
int _MS_PER_STEP = 1000 ~/ 3;
int get stepsPerSecond => 1000 ~/ _MS_PER_STEP;
set stepsPerSecond(int val) => _MS_PER_STEP = 1000 ~/ val;
// Max Frame (i.e. Rendering) rate - does *not* impact game speed
final int _MS_PER_FRAME = 1000 ~/ 30;