Health in HUD

This commit is contained in:
Marco 2025-01-28 09:17:35 +01:00
commit 4b4cbc037a
5 changed files with 45 additions and 10 deletions

View file

@ -37,7 +37,11 @@ public partial class GameManager : Node2D
{
SpawnPlayer();
}
_player.HealthChanged += (newHealth, maxHealth) => _hud.UpdateHealth(newHealth, maxHealth);
//_player.Connect(nameof(_player.HealthChanged), _hud, nameof(_hud.UpdateHealth));
}
// Called every frame. 'delta' is the elapsed time since the previous frame.