You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Scripts/AI/FSM_Template/UI/GatheredText.cs

17 lines
333 B
C#

3 months ago
using TMPro;
using UnityEngine;
public class GatheredText : MonoBehaviour
{
private TMP_Text _text;
private void Awake()
{
_text = GetComponent<TMP_Text>();
}
private void Start()
{
GetComponentInParent<Gatherer>().OnGatheredChanged += (count) => _text.SetText(count.ToString());
}
}