egg is first food!

This commit is contained in:
ethan merchant 2024-11-25 13:51:45 -05:00
parent dd304ae2c8
commit 46a0b2ded7
2 changed files with 31 additions and 27 deletions

View file

@ -205,16 +205,6 @@ static class Arts
); );
} }
// starting egg
meshes["Egg"].Draw(
mat_mono,
Matrix.TRS(
Vec3.Zero,
Quat.Identity,
1
)
);
// holes // holes
foreach (KeyValuePair<XYZi, XYZi> hole in Mono.holes) foreach (KeyValuePair<XYZi, XYZi> hole in Mono.holes)
{ {
@ -244,7 +234,20 @@ static class Arts
); );
} }
if (Mono.eaten == 0)
{
// starting egg
meshes["Egg"].Draw(
mat_mono,
Matrix.TRS(
Vec3.Zero,
Quat.Identity,
Mono.s_array[new XYZi(0, 0, 0)] > -1 ? 1 : 0.5f
)
);
}
else
{
// food // food
if (!food_next) if (!food_next)
{ {
@ -266,6 +269,7 @@ static class Arts
) )
); );
} }
}
// particles // particles
Particle[] particles = VFX.particles; Particle[] particles = VFX.particles;

View file

@ -39,7 +39,7 @@ static class Mono
public static XYZi snake_dir = new(0, 0, 1); public static XYZi snake_dir = new(0, 0, 1);
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, 0, 0); // [!] start random to keep new game fresh?
public static int eaten = 0; 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;