🐛 Bug fixes

This commit is contained in:
2024-08-09 13:49:04 +08:00
parent 6b48561f45
commit 34100ee727
6 changed files with 63 additions and 25 deletions

View File

@ -22,9 +22,7 @@ public partial class HUD : Control
roundBar.Value = World.RoundProgress * 100;
var roundLabel = GetNode<Label>("BottomBox/HBox/RoundLabel");
var roundSecLabel = GetNode<Label>("BottomBox/HBox/RoundSecondLabel");
roundLabel.Text = $"Round {World.RoundCount}";
roundSecLabel.Text = World.RoundTimeLeft.ToString("F2");
var player = World.GetCurrentPlayer();
if (player == null) return;
@ -48,5 +46,8 @@ public partial class HUD : Control
var positionLabel = GetNode<Label>("BottomBox/HBox/PositionLabel");
positionLabel.Text = $"({player.Position.X:F2}, {player.Position.Y:F2})";
var scoreLabel = GetNode<Label>("BottomBox/HBox/ScoreLabel");
scoreLabel.Text = $"Score {World.Scoreboard.GetCurrentData()?.Score.ToString() ?? "-"}";
}
}