did i really spend less than an hour working on this game over the course of an entire week? yes!
This commit is contained in:
parent
b842289076
commit
4a80a6ed0f
10 changed files with 113 additions and 1 deletions
15
Assets/Scripts/Inventory/CraftingRequirementUIObject.cs
Normal file
15
Assets/Scripts/Inventory/CraftingRequirementUIObject.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CraftingRequirementUIObject : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI amountText;
|
||||
public Image itemIcon;
|
||||
|
||||
public void SetObject(Item itemToSet, int amount)
|
||||
{
|
||||
amountText.text = amount.ToString();
|
||||
itemIcon.sprite = itemToSet.icon;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue