show non affordable

This commit is contained in:
Sveske Juice 2024-04-21 06:17:12 +02:00
parent 996509de14
commit 323b0ef4c4
1 changed files with 10 additions and 0 deletions

View File

@ -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