public void RemoveItem(int itemID, Player_Lists player) { foreach (var item in itemDatabase) { if (item.id == itemID) { player.inventory[0] = null; } } }
public void AddItem(int itemID, Player_Lists player) { foreach (var item in itemDatabase) { if (item.id == itemID) { Debug.Log("we have a match"); player.inventory[0] = item; return; } } Debug.Log("Item dose not exist"); }