Esempio n. 1
0
 public virtual void AddItem(PlayerItem Item)
 {
     if (Item is Weapon)
     {
         Weapon Weapon = (Weapon)Item;
         if (weapons.Count == 5)
         {
             MessageBox.Show("You cannot exceed 5 weapons!");
         }
         else
         {
             weapons.Add(Weapon);
             itemList.Add(Weapon);
         }
     }
     else if (Item is AmmoPack)
     {
         AmmoPack pack = (AmmoPack)Item;
         DetermineAmmoPackType(pack);
         itemList.Add(pack);
     }
 }
Esempio n. 2
0
 public void addToInv(PlayerItem item)
 {
     this.itemList.Add(item);
 }
Esempio n. 3
0
 public void remove(PlayerItem item)
 {
     this.itemList.Remove(item);
 }