public void RevomeFromInventory(Item item) { foreach (Item i in _inventoryItems) { if (i.GetItemCategory() == item.GetItemCategory()) { _inventoryItems.Remove(i); break; } } }
public bool AddToInventory(Item item, Character character) { if (IsCategoryPresent(item.GetItemCategory())) { return(false); } else { _inventoryItems.Add(item); character._defence += item._ItemDefence; character._attack += item._ItemAttack; return(true); } }