Skip to content

Commit 1c65c48

Browse files
committed
onLoadUpdate now recives the last ( 100 ) update.
1 parent c9c8533 commit 1c65c48

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/core/StateManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,12 @@ Phaser.StateManager.prototype = {
588588
*/
589589
loadComplete: function () {
590590

591+
// Make sure to do load-update one last time before state is set to _created
592+
if(this.onLoadUpdateCallback)
593+
{
594+
this.onLoadUpdateCallback.call(this.callbackContext, this.game);
595+
}
596+
591597
if (this._created === false && this.onCreateCallback)
592598
{
593599
this._created = true;

src/loader/Loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,10 +1883,10 @@ Phaser.Loader.prototype = {
18831883

18841884
this.onLoadComplete.dispatch();
18851885

1886-
this.reset();
1887-
18881886
this.game.state.loadComplete();
18891887

1888+
this.reset();
1889+
18901890
},
18911891

18921892
/**

0 commit comments

Comments
 (0)