addLife method
Increase life
Implementation
void addLife(double life) {
double newLife = _life + life;
if (newLife > maxLife) {
newLife = maxLife;
}
onRestoreLife(newLife - _life);
_life = newLife;
_verifyLimitsLife();
}
Increase life
void addLife(double life) {
double newLife = _life + life;
if (newLife > maxLife) {
newLife = maxLife;
}
onRestoreLife(newLife - _life);
_life = newLife;
_verifyLimitsLife();
}