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.
17 lines
333 B
C#
17 lines
333 B
C#
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());
|
|
}
|
|
} |