Item Shop getting prices from linked items

This commit is contained in:
brausjonas
2023-04-14 22:40:50 +02:00
parent 9000450834
commit d63c43deb5
6 changed files with 25 additions and 19 deletions
+10
View File
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class ItemShop : MonoBehaviour
@@ -12,4 +13,13 @@ public class ItemShop : MonoBehaviour
{
currentPlayer = _currentPlayer;
}
private void Start()
{
foreach(UIItem ui in items)
{
TMP_Text text = ui.GetComponentInChildren<TMP_Text>();
text.text = ui.item.Cost + "";
}
}
}