Merge pull request #2297 from nexiuhm/master

loadUpdate() now gets a last update when loading is complete.
This commit is contained in:
Richard Davey 2016-02-01 18:20:19 +02:00
commit 13cf12d08a
2 changed files with 8 additions and 2 deletions

View file

@ -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;

View file

@ -1883,10 +1883,10 @@ Phaser.Loader.prototype = {
this.onLoadComplete.dispatch();
this.reset();
this.game.state.loadComplete();
this.reset();
},
/**