diff options
author | Juan J. Martinez <jjm@usebox.net> | 2025-02-09 19:13:33 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2025-02-09 19:13:33 +0000 |
commit | a6e54811e1dbbf909b33eaa0a40bdb4f3b901471 (patch) | |
tree | 28933dbcd32aea6b3c95e7ea90063d8fbad91a39 /js | |
parent | 6f5fa0b5240d6edd3bce72ea1549e4cd9b0ce2bc (diff) | |
download | js-twin-shooter-a6e54811e1dbbf909b33eaa0a40bdb4f3b901471.tar.gz js-twin-shooter-a6e54811e1dbbf909b33eaa0a40bdb4f3b901471.zip |
Diffstat (limited to 'js')
-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); } |