public void damage(int num) { if (curInvinc < 0) { super.damage(num); hpbar.update(-num); // Decreases hp bar amount curInvinc = maxInvinc; // Resset counter grunt.play(); } }
public void heal(int num) { super.heal(num); hpbar.update(num); // Increases hp bar amount }