faked fixed width
This commit is contained in:
parent
f38a9b19d7
commit
9a1bd9ebac
1 changed files with 15 additions and 10 deletions
11
src/Arts.cs
11
src/Arts.cs
|
@ -34,7 +34,7 @@ static class Arts
|
|||
}
|
||||
|
||||
text_style = TextStyle.FromFont(
|
||||
Font.FromFile("HurmitNerd.otf"),
|
||||
Font.FromFile("Staatliches.ttf"),
|
||||
1.0f * U.cm,
|
||||
Color.White
|
||||
);
|
||||
|
@ -245,16 +245,21 @@ static class Arts
|
|||
}
|
||||
|
||||
// score
|
||||
char[] score_txt = Mono.snake_len.ToString("000").ToCharArray();
|
||||
Quat score_ori = Quat.LookDir(Rig.head.position - Mono.box_pose.position);
|
||||
Vec3 score_pos = score_ori * V.XYZ(0, -Mono.SD_Y - 1, -Mono.SD_Z - 1);
|
||||
for (int i = 0; i < score_txt.Length; i++)
|
||||
{
|
||||
Text.Add(
|
||||
Mono.snake_len.ToString("000"),
|
||||
score_txt[i].ToString(),
|
||||
Matrix.TRS(
|
||||
score_ori * V.XYZ(0, -Mono.SD_Y - 1, -Mono.SD_Z - 1),
|
||||
score_pos + score_ori * V.XYZ((1 - i) * 0.25f, 0, 0),
|
||||
score_ori,
|
||||
32
|
||||
),
|
||||
text_style
|
||||
);
|
||||
}
|
||||
|
||||
Hierarchy.Pop();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue