food eaten var

This commit is contained in:
ethan merchant 2024-11-25 13:37:23 -05:00
parent a490da743d
commit 360a075906
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ static class Mono
public static DeltaBool in_box = new(true); public static DeltaBool in_box = new(true);
public static Dictionary<XYZi, XYZi> holes = new(); public static Dictionary<XYZi, XYZi> holes = new();
public static XYZi food = new(0, -1, 0); // [!] start random to keep new game fresh? public static XYZi food = new(0, -1, 0); // [!] start random to keep new game fresh?
public static int eaten = 0;
public static DeltaBool eaten_latch = new(false); public static DeltaBool eaten_latch = new(false);
public static double eat_timestamp = 0.0; public static double eat_timestamp = 0.0;
@ -198,6 +199,7 @@ static class Mono
{ {
eat_timestamp = Time.Total; eat_timestamp = Time.Total;
grow_buffer += 3; grow_buffer += 3;
eaten++;
VFX.Play(snake[0]); VFX.Play(snake[0]);
SFX.crisp_nom.PlayBox(snake[0]); SFX.crisp_nom.PlayBox(snake[0]);

View file

@ -64,7 +64,7 @@ class Program
Mono.Step(); Mono.Step();
Arts.Step(); Arts.Step();
if (Mono.grow_buffer > 0) if (Mono.eaten > 0)
{ {
Mono.intro = false; Mono.intro = false;
} }