@vpmedia/phaser 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/phaser",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -106,17 +106,17 @@ export default class {
106
106
 
107
107
  onUnlockEvent(event) {
108
108
  const initialState = this.context.state;
109
- if (this.context.state !== 'suspended' && this.context.state !== 'interrupted') {
110
- this.onLockChange.dispatch('onUnlockResumeDenied', { state: this.context.state, isLocked: this.isLocked, event });
109
+ if (initialState !== 'suspended' && initialState !== 'interrupted') {
110
+ this.onLockChange.dispatch('onUnlockResumeDenied', { state: initialState, isLocked: this.isLocked, event });
111
111
  this.removeUnlockHandlers();
112
112
  return;
113
113
  }
114
- this.onLockChange.dispatch('onContextResumeStart', { state: this.context.state, isLocked: this.isLocked, event });
114
+ this.onLockChange.dispatch('onContextResumeStart', { state: initialState, isLocked: this.isLocked, event });
115
115
  this.context.resume().then(() => {
116
- this.onLockChange.dispatch('onContextResumeResult', { state: this.context.state, isLocked: this.isLocked });
116
+ this.onLockChange.dispatch('onContextResumeResult', { initialState, state: this.context.state, isLocked: this.isLocked });
117
117
  this.removeUnlockHandlers();
118
118
  }).catch((e) => {
119
- this.onLockChange.dispatch('onContextResumeReject', { state: this.context.state, isLocked: this.isLocked, error: e });
119
+ this.onLockChange.dispatch('onContextResumeReject', { initialState, state: this.context.state, isLocked: this.isLocked, error: e });
120
120
  this.removeUnlockHandlers();
121
121
  this.game.exceptionHandler(e, { initialState, state: this.context.state });
122
122
  });