Spaces:
Runtime error
Runtime error
Update game.html
Browse files
game.html
CHANGED
|
@@ -163,12 +163,13 @@ function hitBomb (player, bomb)
|
|
| 163 |
var mainCamera = this.cameras.main
|
| 164 |
mainCamera.shake(250);
|
| 165 |
mainCamera.fadeOut(3000);
|
| 166 |
-
mainCamera.
|
| 167 |
this.registry.destroy();
|
| 168 |
this.events.off();
|
| 169 |
|
| 170 |
-
});
|
| 171 |
-
this.scene.restart();
|
|
|
|
| 172 |
}
|
| 173 |
</script>
|
| 174 |
<div>
|
|
|
|
| 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 |
|
| 170 |
+
});
|
| 171 |
+
this.input.on('pointerdown', () => this.scene.restart();
|
| 172 |
+
|
| 173 |
}
|
| 174 |
</script>
|
| 175 |
<div>
|