/// <summary> /// Unequipe an object if the object is equipped and put in the inventory. /// return true if the item was unequipped. /// </summary> /// <param name="item"></param> /// <param name="inventory"></param> /// <returns></returns> public override bool UnequipObject(Equipable item, Inventory inventory) { if (item != null) { if (inventory.CanAddItem(item)) { if (item.Equals(body)) { inventory.AddItem(body); Body = null; } else if (item.Equals(rightHand)) { inventory.AddItem(rightHand); RightHand = null; } else if (item.Equals(leftHand)) { inventory.AddItem(leftHand); LeftHand = null; } } } return(false); }