Пример #1
0
 public void SetItem(ItemInstance itemInstance)
 {
     this.slot.SetItem(itemInstance);
 }
Пример #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));
 }
Пример #3
0
        public GameObject prefabInstance; // frontend

        public void SetItem(ItemInstance itemInstance)
        {
            this.itemInstance = itemInstance;
            prefabInstance    = Instantiate(itemInstance.item.itemObject, transform);
        }
Пример #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));
 }