/* protected - [abstract & virtual] */ virtual protected void OnUpdate_InventorySlot(IInventorySlotData pInventoryData) { if (pInventoryData != null) { if (p_pText_ItemName) { p_pText_ItemName.text = pInventoryData.IInventorySlotData_GetItemName(); } if (p_pImage_ItemIcon) { p_pImage_ItemIcon.enabled = true; p_pImage_ItemIcon.sprite = pInventoryData.IInventorySlotData_GetItemIcon(); } } else { if (p_pText_ItemName) { p_pText_ItemName.text = "Empty Slot"; } if (p_pImage_ItemIcon) { p_pImage_ItemIcon.enabled = false; } } }
public void DoSet_InventorySlotItem(IInventorySlotData pInventorySlotData) { _pCurrentSlotData = pInventorySlotData; if (pInventorySlotData != null) { if (p_pImage_CurrentItem) { p_pImage_CurrentItem.sprite = pInventorySlotData.IInventorySlotData_GetItemIcon(); } } else { p_pImage_CurrentItem.sprite = null; } }