Exemplo n.º 1
0
 public void RemoveItem(int itemID, Player_Lists player)
 {
     foreach (var item in itemDatabase)
     {
         if (item.id == itemID)
         {
             player.inventory[0] = null;
         }
     }
 }
Exemplo n.º 2
0
 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");
 }