Add Configurable stepsPerSecond for engine logic
This commit is contained in:
parent
588a3ad2a0
commit
905af769f6
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue