in game/box time
This commit is contained in:
parent
6d495d8307
commit
94bad62aa6
2 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ namespace snake;
|
|||
|
||||
static class Mono
|
||||
{
|
||||
public static double game_time = 0.0;
|
||||
public static double step_step = 60.0 / 80; // 80|100|120 bpm
|
||||
public static double step_time = 0.0;
|
||||
public static double step_t = 0.0;
|
||||
|
|
|
@ -44,6 +44,7 @@ class Program
|
|||
// stepper
|
||||
if (Time.Total > 3.0)
|
||||
{
|
||||
Mono.game_time += Time.Step;
|
||||
Mono.step_time += Time.Step;
|
||||
Mono.step_t = Maths.min(Mono.step_time, Mono.step_step) / Mono.step_step;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue