added Game UI Controller

Show money on UI, buy items
This commit is contained in:
Vladimir Koshevarov
2022-10-18 16:55:38 +03:00
parent 32cdf47d4a
commit fc8393b29f
6 changed files with 78 additions and 17 deletions
+3 -9
View File
@@ -1,5 +1,4 @@
using System;
using TMPro;
using UnityEngine;
public class DateTimeController : MonoBehaviour
@@ -10,9 +9,6 @@ public class DateTimeController : MonoBehaviour
[SerializeField]
private float _startHour;
[SerializeField]
private TextMeshProUGUI _timeText;
[SerializeField]
private Light _sunLight;
@@ -43,6 +39,9 @@ public class DateTimeController : MonoBehaviour
private TimeSpan _sunsetTime;
private DateTime _currentTime;
public DateTime CurrentTime => _currentTime;
// Start is called before the first frame update
void Start()
{
@@ -61,11 +60,6 @@ public class DateTimeController : MonoBehaviour
private void UpdateTime()
{
_currentTime = _currentTime.AddSeconds(Time.deltaTime * _timeMultiplier);
if (_timeText != null)
{
_timeText.text = _currentTime.ToString("HH:mm");
}
}
private void RotateSun()