Exemplo n.º 1
0
 public void Hurt(int Attack)
 {
     _lastHit = Time.time;
     // Reduce the number of hit points by one.
     if (_enemyShield.IsShieldActive())
     {
         int extraDamage = _enemyShield.DamageShield(Attack);
         if (extraDamage != 0)
         {
             _enemyHealth.DamageHealthValue(extraDamage);
         }
     }
     else
     {
         _enemyHealth.DamageHealth(Attack);
     }
 }