food spin on egg

This commit is contained in:
ethan merchant 2024-11-25 16:35:27 -05:00
parent 60436a18d0
commit 62e446c175

View file

@ -237,20 +237,6 @@ 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
if (!food_next)
{
@ -260,6 +246,23 @@ static class Arts
10 * Time.Stepf
);
}
if (Mono.eaten == 0)
{
// starting egg
bool in_snake = Mono.s_array[new XYZi(0, 0, 0)] > -1;
meshes["Egg"].Draw(
mat_mono,
Matrix.TRS(
Vec3.Zero,
in_snake ? Quat.Identity : food_ori,
in_snake ? 1 : 0.5f
)
);
}
else
{
// food
if (!Mono.eaten_latch.state)
{
float food_t = Mono.eaten_latch.delta == -1 ? Maths.smooth_stop((float)Mono.step_t) : 1;