Omnibus commited on
Commit
4240d2a
1 Parent(s): f6adef1

Update game.html

Browse files
Files changed (1) hide show
  1. game.html +6 -3
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(6000);
166
- ///mainCamera.on('camerafadeoutcomplete', function () {
167
- this.scene.restart();
 
 
 
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>