food spin on egg
This commit is contained in:
parent
60436a18d0
commit
62e446c175
1 changed files with 13 additions and 10 deletions
31
src/Arts.cs
31
src/Arts.cs
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue