Example #1
0
 public virtual int ToDamage(UnitParameters parameters)
 {
     Health -= 1;
     if (Health <= 0)
     {
         IsDead = true;
     }
     return(Damage);
 }
Example #2
0
        public void Trigger(IStrike strike)
        {
            var parameters = new UnitParameters().SetHealth(Health);

            Health -= strike.ToDamage(parameters);
            if (Health <= 0)
            {
                IsDead = true;
            }
        }