Added player task system. simple interaction with objects. Known issue - no player stats canvas
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using static GameManager;
|
||||
|
||||
public class GameUIManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private PlayerManager _playerController;
|
||||
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _timeText;
|
||||
|
||||
@@ -34,7 +30,7 @@ public class GameUIManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
_moneyText.text = $"${_playerController.PlayerStats[StatsId.Money].Value}";
|
||||
_moneyText.text = $"${Player.Instance.PlayerStats[StatsId.Money].Value}";
|
||||
|
||||
|
||||
}
|
||||
@@ -46,7 +42,7 @@ public class GameUIManager : MonoBehaviour
|
||||
_timeText.text = TimeManager.CurrentTime.ToString(@"hh\:mm");
|
||||
}
|
||||
|
||||
_energy.value = (float)_playerController.PlayerStats[StatsId.Energy].Value;
|
||||
_food.value = (float)_playerController.PlayerStats[StatsId.Food].Value;
|
||||
_energy.value = (float)Player.Instance.PlayerStats[StatsId.Energy].Value;
|
||||
_food.value = (float)Player.Instance.PlayerStats[StatsId.Food].Value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user