using System.Linq; using Entity; using Prefab; using UnityEngine; namespace UI { public class ItemUI : MonoBehaviour { public UIImageAnimator icon; public InventorySlot inventorySlot; private void Start() { icon.gameObject.SetActive(false); } public void SetDisplayItem(InventorySlot slot) { inventorySlot = slot; if (inventorySlot == null) { icon.gameObject.SetActive(false); } else { icon.gameObject.SetActive(true); icon.SetSprites(inventorySlot.Item.Icon.ToArray()); } } } }