onLoadUpdate now recives the last ( 100 ) update.

This commit is contained in:
nexiuhm 2016-01-14 17:09:41 +01:00
parent c9c85330ab
commit 1c65c48341
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.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();
},
/**