food eaten var
This commit is contained in:
parent
a490da743d
commit
360a075906
2 changed files with 3 additions and 1 deletions
|
@ -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]);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue