summaryrefslogtreecommitdiff
path: root/scripts/GUI/Hud.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-14 10:41:08 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-14 10:41:08 -0300
commit1e17a31e3eeed8ccf76982534002513cee6593f1 (patch)
tree74d8e4fbf706b1008edcd699b0ba7af2d6bb34ea /scripts/GUI/Hud.cs
parent5958d9c071915ab71aea5a5c08d79e88024f6c58 (diff)
Magicas
Diffstat (limited to 'scripts/GUI/Hud.cs')
-rw-r--r--scripts/GUI/Hud.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/GUI/Hud.cs b/scripts/GUI/Hud.cs
index 1149728..227ca32 100644
--- a/scripts/GUI/Hud.cs
+++ b/scripts/GUI/Hud.cs
@@ -1,20 +1,29 @@
+using System.Runtime.InteropServices;
using Godot;
namespace TheLegendOfGustav.GUI;
public partial class Hud : Node
{
- private TextureProgressBar HpBar { get; set; }
+ private TextureProgressBar hpBar;
+ private TextureProgressBar mpBar;
public override void _Ready()
{
base._Ready();
- HpBar = GetNode<TextureProgressBar>("VBoxContainer/InfoBar/Stats/MarginContainer/HBoxContainer/AspectRatioContainer/HPbar");
+ hpBar = GetNode<TextureProgressBar>("VBoxContainer/InfoBar/Stats/MarginContainer/HBoxContainer/AspectRatioContainer/HPbar");
+ mpBar = GetNode<TextureProgressBar>("VBoxContainer/InfoBar/Stats/MarginContainer/HBoxContainer/AspectRatioContainer2/MPbar");
}
public void OnHealthChanged(int hp, int maxHp)
{
- HpBar.Value = hp;
- HpBar.MaxValue = maxHp;
+ hpBar.Value = hp;
+ hpBar.MaxValue = maxHp;
+ }
+
+ public void OnManaChanged(int mp, int maxMp)
+ {
+ mpBar.Value = mp;
+ mpBar.MaxValue = maxMp;
}
}