diff --git a/v3/src/boot/CreateRenderer.js b/v3/src/boot/CreateRenderer.js index a4ed6d5da..2e23bb14d 100644 --- a/v3/src/boot/CreateRenderer.js +++ b/v3/src/boot/CreateRenderer.js @@ -80,6 +80,8 @@ var CreateRenderer = function (game) { game.renderer = new CanvasRenderer(game); game.context = game.renderer.gameContext; + // debug + game.canvas.id = 'game'; } }; diff --git a/v3/src/checksum.js b/v3/src/checksum.js index 2a3476442..c471a3b0b 100644 --- a/v3/src/checksum.js +++ b/v3/src/checksum.js @@ -1,4 +1,4 @@ var CHECKSUM = { -build: 'd9e54760-ed4f-11e6-a917-0f5f0c1052e9' +build: 'ec84a400-ed6e-11e6-b72e-61e1cba6b1dc' }; module.exports = CHECKSUM; \ No newline at end of file diff --git a/v3/src/state/StateManager.js b/v3/src/state/StateManager.js index 048618b98..4e684c407 100644 --- a/v3/src/state/StateManager.js +++ b/v3/src/state/StateManager.js @@ -463,14 +463,6 @@ StateManager.prototype = { console.log('loadComplete', state.sys.settings.key); - // Make sure to do load-update one last time before state is set to _created - - // Stop doing this ... - if (state.hasOwnProperty('loadUpdate')) - { - state.loadUpdate.call(state); - } - this.startCreate(state); }, @@ -492,8 +484,14 @@ StateManager.prototype = { this.active.push({ index: i, state: state }); + // console.log('a1'); + // console.dir(this.active); + // Sort the 'active' array based on the index property - this.active.sort(this.sortStates.bind(this)); + this.active.sort(this.sortStates); + + // console.log('a2'); + // console.dir(this.active); state.sys.updates.running = true; }, @@ -516,6 +514,8 @@ StateManager.prototype = { sortStates: function (stateA, stateB) { + // console.log('sortStates', stateA.state.sys.settings.key, stateA.index, stateB.state.sys.settings.key, stateB.index); + // Sort descending if (stateA.index < stateB.index) {