Omnibus commited on
Commit
cd2b34c
1 Parent(s): 8097c8f

Update game.html

Browse files
Files changed (1) hide show
  1. game.html +6 -3
game.html CHANGED
@@ -159,9 +159,12 @@ function hitBomb (player, bomb)
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>
 
159
  player.setTint(0xff0000);
160
  player.anims.play('turn');
161
  gameOver = true;
162
+
163
+ var manCamera = this.cameras.main
164
+ manCamera.shake(250)
165
+ mainCamera.on('camerafadeoutcomplete', function () {
166
+ this.scene.start('GameOver');
167
+ })
168
  }
169
  </script>
170
  <div>