removeLife method

void removeLife(
  1. double life
)

reduce life

Implementation

void removeLife(double life) {
  double newLife = _life - life;
  if (newLife < 0) {
    newLife = 0;
  }
  onRemoveLife(_life - newLife);
  _life = newLife;

  _verifyLimitsLife();
}