Files
harvestdale-unity/Assets/Scripts/Clock.cs
Janis 3b50e5062f asd
2023-02-15 20:16:18 +01:00

17 lines
348 B
C#

using UnityEngine;
using TMPro;
public class Clock : MonoBehaviour
{
private TextMeshProUGUI text;
private void Start()
{
text = GetComponent<TextMeshProUGUI>();
TimeManager.OnMinuteChanged += GetTime;
}
private void GetTime()
{
text.SetText($"{TimeManager.Day:00}D | {TimeManager.Hour:00}:{TimeManager.Minute:00}");
}
}