Files
proto_rts/Assets/Scripts/MineralDisplay.cs
T
krazzei 2e068a625c Really Basic rts mechanics.
Really need a way to attack and enemies to be a true MVP.
But for iteration 0 this is fine.
Need Kenney Art.
Need a way to Attack.
Need Rally Points.
Need Fog of War.
Need a HUD for better unit selection.
Need Mini Map.
I can go on, this is by far the most complex Prototype I've ever done.
2021-02-15 15:41:17 -06:00

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}";
}
}