Beispiel #1
0
 public bool Equip(IHandEquipable item, bool left)
 {
     if (left) //left
     {
         if (LeftHand.IsEmpty)
         {
             LeftHand.CurrentlyEquipped = (IHandEquipable)item;
             return(true);
         }
         else
         {
             _owner.Inventory.AddItem((Item)LeftHand.CurrentlyEquipped);
             LeftHand.CurrentlyEquipped = (IHandEquipable)item;
             return(true);
         }
     }
     else //right
     {
         if (RightHand.IsEmpty)
         {
             RightHand.CurrentlyEquipped = (IHandEquipable)item;
             return(true);
         }
         else
         {
             _owner.Inventory.AddItem((Item)RightHand.CurrentlyEquipped);
             RightHand.CurrentlyEquipped = (IHandEquipable)item;
             return(true);
         }
     }
 }
Beispiel #2
0
 public void Equip(IHandEquipable item, bool left)
 {
     Equipment.Equip(item, left);
 }