false tail
This commit is contained in:
parent
8167ab990b
commit
6181e4ae49
1 changed files with 13 additions and 12 deletions
25
src/Arts.cs
25
src/Arts.cs
|
@ -121,18 +121,19 @@ static class Arts
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// tail
|
// false tail
|
||||||
if (Mono.grow_buffer > 0) { snake_t = 0.0f; }
|
if (tailmove.state && snake_t < 1.0f) {
|
||||||
int i_tail = Mono.snake_len - 1;
|
int i_tail = Mono.snake_len - 1;
|
||||||
Vec3 tail_dir = Vec3.Direction(Mono.snake[i_tail - 1].ToVec3, Mono.snake[i_tail].ToVec3);
|
Vec3 tail_dir = Vec3.Direction(Mono.snake[i_tail - 1].ToVec3, Mono.snake[i_tail].ToVec3);
|
||||||
meshes["Segment"].Draw(
|
meshes["Segment"].Draw(
|
||||||
mat_mono,
|
mat_mono,
|
||||||
Matrix.TRS(
|
Matrix.TRS(
|
||||||
Mono.snake[i_tail].ToVec3 + (tail_dir * (float)(snake_t) * 0.7f),
|
Mono.snake[i_tail].ToVec3 + (tail_dir * (float)(snake_t) * 0.7f),
|
||||||
Quat.LookDir(tail_dir),
|
Quat.LookDir(tail_dir),
|
||||||
V.XYZ(1, 1, (float)(1.0 - snake_t))
|
V.XYZ(1, 1, (float)(1.0 - snake_t))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// holes
|
// holes
|
||||||
foreach (KeyValuePair<XYZi, XYZi> hole in Mono.holes)
|
foreach (KeyValuePair<XYZi, XYZi> hole in Mono.holes)
|
||||||
|
|
Loading…
Add table
Reference in a new issue