From 0456e7cd82b232a38fd9b6e008be7d49b2f9e90f Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 1 Sep 2025 17:50:25 -0300 Subject: Logs --- scripts/GUI/Hud.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/GUI/Hud.cs (limited to 'scripts/GUI/Hud.cs') diff --git a/scripts/GUI/Hud.cs b/scripts/GUI/Hud.cs new file mode 100644 index 0000000..5f49121 --- /dev/null +++ b/scripts/GUI/Hud.cs @@ -0,0 +1,17 @@ +using Godot; +using System; + +public partial class Hud : Node +{ + private TextureProgressBar hpBar; + + public override void _Ready() { + base._Ready(); + hpBar = GetNode("InfoBar/Stats/MarginContainer/HBoxContainer/HPbar"); + } + + public void OnHealthChanged(int hp, int maxHp) { + hpBar.Value = hp; + hpBar.MaxValue = maxHp; + } +} -- cgit v1.2.3