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