Exemplo n.º 1
0
        /// <summary>
        /// Equip equipment.
        /// </summary>
        /// <param name="equipment">Equipment to equip.</param>
        public void Equip(IEquipment equipment)
        {
            var shield = equipment as IShield;

            if (shield != null)
            {
                // If another shield is already equipped set its position to Position
                if (IsShieldEquipped)
                {
                    Shield.UnequippedBy(this);
                }

                Shield = shield;
            }

            equipment.EquippedBy(this);
        }