Beispiel #1
0
    public void AddToInventory(InventoryItemBehaviour item)
    {
        Debug.Log("Adding item: " + item.itemName);
        Debug.Log(item);

        inventory.Add(item);
    }
Beispiel #2
0
    public void RemoveNewItem(string name)
    {
        InventoryItemBehaviour item = _items.Find(x => x.Item != null && x.Item.Name == name);

        if (item)
        {
            item.RemoveItem();
        }
    }
Beispiel #3
0
 public bool InInventory(InventoryItemBehaviour item)
 {
     return(inventory.Contains(item));
 }
Beispiel #4
0
 public void RemoveFromInventory(InventoryItemBehaviour item)
 {
     Debug.Log("Removing item: " + item.itemName);
     inventory.Remove(item);
 }