add areaname
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Interfaces;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -9,6 +10,9 @@ public class TopBarUI : MonoBehaviour
|
||||
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _moneyText;
|
||||
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _locationText;
|
||||
|
||||
[SerializeField]
|
||||
public Slider _energy;
|
||||
@@ -31,8 +35,8 @@ public class TopBarUI : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
_moneyText.text = $"${Player.Instance.Stats[StatsId.Money].Value}";
|
||||
|
||||
_moneyText.text = $"${(Player.Instance.Stats[StatsId.Money] as INumericStat).Value}";
|
||||
_locationText.text= $"{(Player.Instance.Stats[StatsId.LocationName] as IStringStat).Value}";
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +47,7 @@ public class TopBarUI : MonoBehaviour
|
||||
_timeText.text = $"{TimeManager.CurrentTime.GetDayName()} {TimeManager.CurrentTime.ToString(@"hh\:mm")} day ({TimeManager.CurrentTime.Days})";
|
||||
}
|
||||
|
||||
_energy.value = (float)Player.Instance.Stats[StatsId.Energy].Value;
|
||||
_food.value = (float)Player.Instance.Stats[StatsId.Food].Value;
|
||||
_energy.value = (Player.Instance.Stats[StatsId.Energy] as INumericStat).Value;
|
||||
_food.value = (Player.Instance.Stats[StatsId.Food] as INumericStat).Value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user