mirror of
https://github.com/wassname/phaser.git
synced 2026-07-14 01:10:16 +08:00
New filters and demos: LightBeams, Fire and Tunnel. Also Loader can now load script files.
This commit is contained in:
@@ -110,6 +110,9 @@ Phaser.StateManager.prototype = {
|
||||
*/
|
||||
boot: function () {
|
||||
|
||||
this.game.onPause.add(this.pause, this);
|
||||
this.game.onResume.add(this.resume, this);
|
||||
|
||||
if (this._pendingState !== null)
|
||||
{
|
||||
if (typeof this._pendingState === 'string')
|
||||
@@ -392,6 +395,32 @@ Phaser.StateManager.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.StateManager#pause
|
||||
* @protected
|
||||
*/
|
||||
pause: function () {
|
||||
|
||||
if (this._created && this.onPausedCallback)
|
||||
{
|
||||
this.onPausedCallback.call(this.callbackContext, this.game, true);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.StateManager#resume
|
||||
* @protected
|
||||
*/
|
||||
resume: function () {
|
||||
|
||||
if (this._created && this.onre)
|
||||
{
|
||||
this.onPausedCallback.call(this.callbackContext, this.game, false);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Phaser.StateManager#update
|
||||
* @protected
|
||||
|
||||
Reference in New Issue
Block a user