Update game.html
Browse files
game.html
CHANGED
@@ -109,11 +109,8 @@ function create ()
|
|
109 |
function update ()
|
110 |
{
|
111 |
if (gameOver)
|
112 |
-
{
|
113 |
-
|
114 |
-
mainCamera.fadeOut(3000);
|
115 |
-
this.registry.destroy();
|
116 |
-
this.events.off();
|
117 |
this.scene.restart();
|
118 |
return;
|
119 |
}
|
@@ -163,6 +160,10 @@ function hitBomb (player, bomb)
|
|
163 |
this.physics.pause();
|
164 |
player.setTint(0xff0000);
|
165 |
player.anims.play('turn');
|
|
|
|
|
|
|
|
|
166 |
gameOver = true;
|
167 |
}
|
168 |
</script>
|
|
|
109 |
function update ()
|
110 |
{
|
111 |
if (gameOver)
|
112 |
+
{ this.registry.destroy();
|
113 |
+
this.events.off();
|
|
|
|
|
|
|
114 |
this.scene.restart();
|
115 |
return;
|
116 |
}
|
|
|
160 |
this.physics.pause();
|
161 |
player.setTint(0xff0000);
|
162 |
player.anims.play('turn');
|
163 |
+
var mainCamera = this.cameras.main
|
164 |
+
mainCamera.shake(250);
|
165 |
+
mainCamera.fadeOut(3000);
|
166 |
+
|
167 |
gameOver = true;
|
168 |
}
|
169 |
</script>
|