Update game.html
Browse files
game.html
CHANGED
@@ -162,9 +162,12 @@ function hitBomb (player, bomb)
|
|
162 |
|
163 |
var mainCamera = this.cameras.main
|
164 |
mainCamera.shake(250);
|
165 |
-
mainCamera.fadeOut(
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
168 |
|
169 |
}
|
170 |
</script>
|
|
|
162 |
|
163 |
var mainCamera = this.cameras.main
|
164 |
mainCamera.shake(250);
|
165 |
+
mainCamera.fadeOut(3000);
|
166 |
+
mainCamera.once('camerafadeoutcomplete', function () {
|
167 |
+
this.registry.destroy();
|
168 |
+
this.events.off();
|
169 |
+
this.scene.restart();
|
170 |
+
});
|
171 |
|
172 |
}
|
173 |
</script>
|