HatCatter/Assets/Scripts/PlayerUI.cs

22 lines
444 B
C#
Executable File

using UnityEngine;
using UnityEngine.UI;
public class PlayerUI : MonoBehaviour
{
public Text healthText;
public GameManager gm;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
// todo: automatically find game manager
}
// Update is called once per frame
void Update()
{
healthText.text = gm.currentHealth.ToString();
}
}