literally half of the game
This commit is contained in:
parent
1590b5faa6
commit
b842289076
77 changed files with 11904 additions and 72 deletions
18
Assets/Scripts/Inventory/InventoryUIObject.cs
Normal file
18
Assets/Scripts/Inventory/InventoryUIObject.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class InventoryUIObject : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI itemNameText;
|
||||
public TextMeshProUGUI amountText;
|
||||
public Image itemIcon;
|
||||
|
||||
public void SetObject(Item itemToSet)
|
||||
{
|
||||
Debug.Log("here");
|
||||
itemNameText.text = itemToSet.itemName; //it would be reset every time you open the inventory instead of updating only the amount but whatever it doesn't matter
|
||||
amountText.text = $"x{InventoryManager.instance.CheckItemAmount(itemToSet)}";
|
||||
itemIcon.sprite = itemToSet.icon;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue