Exemple #1
0
    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());
    }
Exemple #2
0
    public void SetItem(IInventoryItem item)
    {
        m_Item = item;
        if (Icon != null)
        {
            Icon.sprite = item.GetImage();
        }

        if (Description != null)
        {
            Description.text = item.GetDescription();
        }
    }
Exemple #3
0
 public Sprite GetImage()
 {
     return(m_item.GetImage());
 }