mirror of
https://github.com/DerTyp7/grow-ai-unity.git
synced 2025-10-30 04:47:10 +01:00
20 lines
374 B
C#
20 lines
374 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class MoneyUI : MonoBehaviour
|
|
{
|
|
TextMeshProUGUI moneyText;
|
|
|
|
void Start()
|
|
{
|
|
TimeManager.OnTimeUpdate += OnTimeUpdate;
|
|
moneyText = GetComponent<TextMeshProUGUI>();
|
|
}
|
|
|
|
void OnTimeUpdate()
|
|
{
|
|
if (moneyText != null)
|
|
moneyText.text = EconomyManager.instance.GetMoneyStr();
|
|
}
|
|
}
|