diff --git a/Assets/Scripts/Manager/MoneyManager.cs b/Assets/Scripts/Manager/MoneyManager.cs index c650f30..7120bbd 100644 --- a/Assets/Scripts/Manager/MoneyManager.cs +++ b/Assets/Scripts/Manager/MoneyManager.cs @@ -28,6 +28,16 @@ public class MoneyManager : MonoBehaviour } } + private void Update() + { + // TODO: move to observer patter idgaf rn + for (int i = 0; i < MoneyTexts.Length; i++) + { + float price = towerCollection.Towers[i].price; + MoneyTexts[i].color = GameManager.Instance.Balance.Value >= price ? Color.green : Color.red; + } + } + private void Start() { // Show prices