ItemSlotUI
user_3183455
csharp
a year ago
723 B
7
Indexable
using TMPro; using UnityEngine; using UnityEngine.UI; namespace CuongMono.Item { public abstract class ItemSlotUI : MonoBehaviour { [Header("Item Slot UI")] [SerializeField] protected Image iconImage; [SerializeField] protected TextMeshProUGUI quanityText; protected CanvasGroup canvasGroup; public int SlotIndex { get; private set; } public abstract Item Item { get; set; } private void Start() { this.canvasGroup = this.iconImage.GetComponent<CanvasGroup>(); this.SlotIndex = transform.GetSiblingIndex(); this.UpdateUI(); } public abstract void UpdateUI(); } }
Editor is loading...
Leave a Comment