Пример #1
0
 internal void Add(Inventory inventory)
 {
     for (int i = 0; i < inventory.InventItems.Count; i++)
     {
         InventItems.Add(inventory.InventItems[i]);
     }
 }
Пример #2
0
    /// <summary>
    /// Will say if this inventory contains 'prod'
    /// </summary>
    /// <param name="prod"></param>
    /// <returns></returns>
    internal bool Contains(P prod)
    {
        var prodHere = InventItems.Find(a => a.Key == prod);

        if (prodHere == null)
        {
            return(false);
        }
        return(true);
    }
Пример #3
0
 internal void RemoveFromSpecialInv(string buildMyId)
 {
     for (int i = 0; i < InventItems.Count; i++)
     {
         if (InventItems[i].Info == buildMyId)
         {
             InventItems.RemoveAt(i);
             return;
         }
     }
 }
Пример #4
0
 public void AddToSpecialInv(P key)
 {
     InventItems.Add(new InvItem(key, 0));
 }
Пример #5
0
 public void AddToSpecialInv(string key)
 {
     InventItems.Add(new InvItem(key));
 }