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); } } }
public void Equip(IHandEquipable item, bool left) { Equipment.Equip(item, left); }