Item Shop getting prices from linked items
This commit is contained in:
@@ -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 + "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user