aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2025-02-09 19:13:33 +0000
committerJuan J. Martinez <jjm@usebox.net>2025-02-09 19:13:33 +0000
commita6e54811e1dbbf909b33eaa0a40bdb4f3b901471 (patch)
tree28933dbcd32aea6b3c95e7ea90063d8fbad91a39 /js
parent6f5fa0b5240d6edd3bce72ea1549e4cd9b0ce2bc (diff)
downloadjs-twin-shooter-main.tar.gz
js-twin-shooter-main.zip
Abstractions: use them!HEADmain
Diffstat (limited to 'js')
-rw-r--r--js/mygame.js2
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);
}