public void SetItem(ItemInstance itemInstance)
 {
     this.slot.SetItem(itemInstance);
 }
Beispiel #2
0
 // Insert an item, return the index where it was inserted.  -1 if error.
 public int InsertItem(int tabIndex, ItemInstance item)
 {
     return(inventoryTabs[tabIndex].InsertItem(item));
 }
Beispiel #3
0
        public GameObject prefabInstance; // frontend

        public void SetItem(ItemInstance itemInstance)
        {
            this.itemInstance = itemInstance;
            prefabInstance    = Instantiate(itemInstance.item.itemObject, transform);
        }
Beispiel #4
0
 // Get an item if it exists.
 public bool GetItem(int tabIndex, int index, out ItemInstance item)
 {
     // inventory[index] doesn't return null, so check item instead.
     return(inventoryTabs[tabIndex].GetItem(index, out item));
 }