}
}
+ kill() {
+ this.health = 0;
+ this.healthBar.update(this.love, this.maxHealth, this.health);
+ super.kill();
+ }
+
loveUp() {
this.love++
this.maxHealth += this.love;
game.physics.arcade.enable(this);
}
+ damage(amount) {
+ super.damage(amount);
+ if (this.alive) { game.add.tween(this).to({ x: this.x + (Math.random() - 0.5) * 10 }, 10, Phaser.Easing.Sinusoidal.InOut, true, 0, 8, true); }
+ }
+
kill() {
super.kill();
player.loveUp();