mirror of
				https://github.com/DerTyp7/harvestdale-unity.git
				synced 2025-10-30 21:17:09 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			348 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			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}");
 | |
|   }
 | |
| } | 
