addLife method
increase life in the player
Implementation
void addLife(double life) {
this.life += life;
if (this.life > maxLife) {
this.life = maxLife;
}
}
increase life in the player
void addLife(double life) {
this.life += life;
if (this.life > maxLife) {
this.life = maxLife;
}
}