mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Merge pull request #2297 from nexiuhm/master
loadUpdate() now gets a last update when loading is complete.
This commit is contained in:
commit
13cf12d08a
2 changed files with 8 additions and 2 deletions
|
@ -588,6 +588,12 @@ Phaser.StateManager.prototype = {
|
|||
*/
|
||||
loadComplete: function () {
|
||||
|
||||
// Make sure to do load-update one last time before state is set to _created
|
||||
if (this._created === false && this.onLoadUpdateCallback)
|
||||
{
|
||||
this.onLoadUpdateCallback.call(this.callbackContext, this.game);
|
||||
}
|
||||
|
||||
if (this._created === false && this.onCreateCallback)
|
||||
{
|
||||
this._created = true;
|
||||
|
|
|
@ -1883,10 +1883,10 @@ Phaser.Loader.prototype = {
|
|||
|
||||
this.onLoadComplete.dispatch();
|
||||
|
||||
this.reset();
|
||||
|
||||
this.game.state.loadComplete();
|
||||
|
||||
this.reset();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue