From 360a075906c6bf672515ad6b743298eef5604d3d Mon Sep 17 00:00:00 2001 From: spatialfree Date: Mon, 25 Nov 2024 13:37:23 -0500 Subject: [PATCH] food eaten var --- src/Mono.cs | 2 ++ src/Program.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mono.cs b/src/Mono.cs index a351a0d..2d43869 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -31,6 +31,7 @@ static class Mono public static DeltaBool in_box = new(true); public static Dictionary holes = new(); 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 double eat_timestamp = 0.0; @@ -198,6 +199,7 @@ static class Mono { eat_timestamp = Time.Total; grow_buffer += 3; + eaten++; VFX.Play(snake[0]); SFX.crisp_nom.PlayBox(snake[0]); diff --git a/src/Program.cs b/src/Program.cs index 55d3eae..cf7af0f 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -64,7 +64,7 @@ class Program Mono.Step(); Arts.Step(); - if (Mono.grow_buffer > 0) + if (Mono.eaten > 0) { Mono.intro = false; }