blob: 614fa5e38c7683a4f2053b346226ef2522abfd7c (
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 Hud : Node
{
private TextureProgressBar hpBar;
public override void _Ready() {
base._Ready();
hpBar = GetNode<TextureProgressBar>("VBoxContainer/InfoBar/Stats/MarginContainer/HBoxContainer/AspectRatioContainer/HPbar");
}
public void OnHealthChanged(int hp, int maxHp) {
hpBar.Value = hp;
hpBar.MaxValue = maxHp;
}
}
|