mirror of
				https://github.com/DerTyp7/grow-ai-unity.git
				synced 2025-10-30 21:07:09 +01:00 
			
		
		
		
	money UI
This commit is contained in:
		
							
								
								
									
										21
									
								
								Assets/Scripts/UI/TimeUI.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Assets/Scripts/UI/TimeUI.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| using System; | ||||
| using UnityEngine; | ||||
| using TMPro; | ||||
|  | ||||
| public class TimeUI : MonoBehaviour | ||||
| { | ||||
|     TextMeshProUGUI dateTimeText; | ||||
|  | ||||
|     private void Start() | ||||
|     { | ||||
|         TimeManager.OnTimeUpdate += OnTimeUpdate; | ||||
|         dateTimeText = GetComponent<TextMeshProUGUI>(); | ||||
|     } | ||||
|  | ||||
|     void OnTimeUpdate() | ||||
|     { | ||||
|         DateTime dateTime = TimeManager.instance.GetDateTime(); | ||||
|         if (dateTimeText != null) | ||||
|             dateTimeText.text = dateTime.ToString("hh:mm tt / dd.MM.yyyy", TimeManager.instance.cultureInfo); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 j.mei7
					j.mei7