public static void SpawnInventoryNotification(GameObject prefab, Transform target_parent, IInventoryItem item, int count, string custom_text) { GameObject new_obj = spawnGameObject(prefab, target_parent); new_obj.GetComponent <UI_UnitEventView>().SetEvent(item.GetImage(), "+" + count + " " + item.GetID()); }
public void SetItem(IInventoryItem item) { m_Item = item; if (Icon != null) { Icon.sprite = item.GetImage(); } if (Description != null) { Description.text = item.GetDescription(); } }
public Sprite GetImage() { return(m_item.GetImage()); }