mirror of
https://github.com/DerTyp7/harvestdale-unity.git
synced 2025-10-30 13:07:10 +01:00
asd
This commit is contained in:
17
Assets/Scripts/Clock.cs
Normal file
17
Assets/Scripts/Clock.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user