示例#1
0
 public void Unequip(Gear gear)
 {
     if (gear.GearType == "Head")
     {
         InventoryGears.Add(gear);
         Head   = null;
         HeadId = null;
     }
     else if (gear.GearType == "Armor")
     {
         InventoryGears.Add(gear);
         Armor   = null;
         ArmorId = null;
     }
     else if (gear.GearType == "Legs")
     {
         InventoryGears.Add(gear);
         Legs   = null;
         LegsId = null;
     }
     else if (gear.GearType == "Ring1")
     {
         InventoryGears.Add(gear);
         Ring1   = null;
         Ring1Id = null;
     }
     else if (gear.GearType == "Ring2")
     {
         InventoryGears.Add(gear);
         Ring2   = null;
         Ring2Id = null;
     }
     else if (gear.GearType == "Special")
     {
         InventoryGears.Add(gear);
         Special   = null;
         SpecialId = null;
     }
     else if (gear.GearType == "Attack")
     {
         InventoryGears.Add(gear);
         Attack   = null;
         AttackId = null;
     }
 }
示例#2
0
 public void Equip(Gear gear)
 {
     if (gear.GearType == "Head")
     {
         if (Head != null)
         {
             InventoryGears.Add(Head);
         }
         Head   = gear;
         HeadId = Head.Id;
     }
     else if (gear.GearType == "Armor")
     {
         if (Armor != null)
         {
             InventoryGears.Add(Armor);
         }
         Armor   = gear;
         ArmorId = Armor.Id;
     }
     else if (gear.GearType == "Legs")
     {
         if (Legs != null)
         {
             InventoryGears.Add(Legs);
         }
         Legs   = gear;
         LegsId = Legs.Id;
     }
     else if (gear.GearType == "Ring")
     {
         if (Ring1 == null)
         {
             Ring1   = gear;
             Ring1Id = Ring1.Id;
         }
         else
         {
             if (Ring2 != null)
             {
                 InventoryGears.Add(Ring2);
             }
             Ring2   = gear;
             Ring1Id = Ring2.Id;
         }
     }
     else if (gear.GearType == "Special")
     {
         if (Special != null)
         {
             InventoryGears.Add(Special);
         }
         Special   = gear;
         SpecialId = Special.Id;
     }
     else if (gear.GearType == "Attack")
     {
         if (Attack != null)
         {
             InventoryGears.Add(Attack);
         }
         Attack   = gear;
         AttackId = Attack.Id;
     }
 }