summaryrefslogtreecommitdiff
path: root/scripts/UI.cs
diff options
context:
space:
mode:
authorGustavoEklund <eklundgu@gmail.com>2025-08-28 20:38:10 -0300
committerGustavoEklund <eklundgu@gmail.com>2025-08-28 20:38:10 -0300
commit5f23459b25f9232847e2c9b33b3171937c536fd6 (patch)
tree16926b62e80a1d0a9ec08ca8e57398faef76f26f /scripts/UI.cs
parentf55c5e899a073cc0033fdbdde04a2de4644433fb (diff)
parent3c9192b24c09146df066fd986f34d269c50648e8 (diff)
Merge branch 'master' of https://github.com/Simplesmente-O-Grupo/projeto-fantasia
Diffstat (limited to 'scripts/UI.cs')
-rw-r--r--scripts/UI.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/UI.cs b/scripts/UI.cs
new file mode 100644
index 0000000..fada956
--- /dev/null
+++ b/scripts/UI.cs
@@ -0,0 +1,17 @@
+using Godot;
+using System;
+
+public partial class UI : Node2D
+{
+ private TextureProgressBar hpBar;
+
+ public override void _Ready() {
+ base._Ready();
+ hpBar = GetNode<TextureProgressBar>("CanvasLayer/HPbar");
+ }
+
+ public void OnHealthChanged(int hp, int maxHp) {
+ hpBar.Value = hp;
+ hpBar.MaxValue = maxHp;
+ }
+}