summaryrefslogtreecommitdiff
path: root/scripts/UI.cs
blob: 781c14a037c96e13e90c6a6ac19d0afcd0bf7c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using Godot;
using System;

public partial class UI : Node
{
	private TextureProgressBar hpBar;

	public override void _Ready() {
		base._Ready();
		hpBar = GetNode<TextureProgressBar>("CanvasLayer/MainContainer/HPbar");
	}

	public void OnHealthChanged(int hp, int maxHp) {
		hpBar.Value = hp;
		hpBar.MaxValue = maxHp;
	}
}