✨ Player died & Round & Respawn
This commit is contained in:
		@@ -18,6 +18,14 @@ public partial class HUD : Control
 | 
			
		||||
 | 
			
		||||
	public override void _Process(double delta)
 | 
			
		||||
	{
 | 
			
		||||
		var roundBar = GetNode<ProgressBar>("BottomBox/ProgressBar");
 | 
			
		||||
		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;
 | 
			
		||||
 | 
			
		||||
@@ -37,5 +45,8 @@ public partial class HUD : Control
 | 
			
		||||
		ammoLabel.Text = player.IsReloading
 | 
			
		||||
			? $"Reloading... {player.TimeRemainingOfReload:F2}"
 | 
			
		||||
			: $"Ammo {player.AmmoAmount}/{player.MaxAmmoAmount}";
 | 
			
		||||
		
 | 
			
		||||
		var positionLabel = GetNode<Label>("BottomBox/HBox/PositionLabel");
 | 
			
		||||
		positionLabel.Text = $"({player.Position.X:F2}, {player.Position.Y:F2})";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user