proto_rts/Assets/Scripts/MineralDisplay.cs

20 lines
379 B
C#

using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(Text))]
public class MineralDisplay : MonoBehaviour
{
private Text _text;
private void Start()
{
_text = GetComponent<Text>();
}
private void Update()
{
// TODO: probably want more of an event driven UI update.
_text.text = $"Minerals: {Team.Minerals}";
}
}