Gruppe22.Backend.Actor.AddProtection C# (CSharp) Метод

AddProtection() публичный Метод

Method to increase the amount of armor an actor has. Does not change anything if armor>amount
public AddProtection ( int amount ) : void
amount int the new amount the armor the actor should have
Результат void
        public void AddProtection(int amount)
        {
            if (amount > _armor)
            {
                _armor = amount;
                _tile.HandleEvent(false, Backend.Events.ShowMessage, ((_actorType == ActorType.Player) ? "You equip  " : (_name + " equips ")) + " new armor.");
            }
            else
            {
                _tile.HandleEvent(false, Backend.Events.ShowMessage, ((_actorType == ActorType.Player) ? "You put " : (_name + " puts ")) + " the armor away.");
            }
        }