Update game.html
Browse files
game.html
CHANGED
@@ -159,6 +159,9 @@ function hitBomb (player, bomb)
|
|
159 |
player.setTint(0xff0000);
|
160 |
player.anims.play('turn');
|
161 |
gameOver = true;
|
|
|
|
|
|
|
162 |
}
|
163 |
</script>
|
164 |
<div>
|
|
|
159 |
player.setTint(0xff0000);
|
160 |
player.anims.play('turn');
|
161 |
gameOver = true;
|
162 |
+
this.registry.destroy(); // destroy registry
|
163 |
+
this.events.off(); // disable all active events
|
164 |
+
this.scene.restart(); // restart current scene
|
165 |
}
|
166 |
</script>
|
167 |
<div>
|