diff options
-rw-r--r-- | js/mygame.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/mygame.js b/js/mygame.js index e4453ff..d333345 100644 --- a/js/mygame.js +++ b/js/mygame.js @@ -527,7 +527,7 @@ class MyGame extends Game { this.ctx.drawImage(this.res["wave"], 4, CANVAS_SIZE.h - 8 - 4); /* game over */ - if (this.player.life == 0) { + if (!this.player.is_alive()) { this.ctx.drawImage(this.res["game_over"], CANVAS_SIZE.w / 2 - 36, CANVAS_SIZE.h / 2 - 6); this.ctx.drawImage(this.res["space_restart"], CANVAS_SIZE.w / 2 - 76, CANVAS_SIZE.h / 2 + 4); } |