mirror of
https://github.com/wassname/phaser.git
synced 2026-07-24 13:10:53 +08:00
Tidying up the repo, moving old wip stuff out, clearing up the docs.
This commit is contained in:
@@ -584,6 +584,11 @@ Phaser.StateManager = function (game, pendingState) {
|
||||
*/
|
||||
this.onPausedCallback = null;
|
||||
|
||||
/**
|
||||
* @property {function} onResumedCallback - This will be called when the state is resumed from a paused state.
|
||||
*/
|
||||
this.onResumedCallback = null;
|
||||
|
||||
/**
|
||||
* @property {function} onShutDownCallback - This will be called when the state is shut down (i.e. swapped to another state).
|
||||
*/
|
||||
@@ -686,6 +691,7 @@ Phaser.StateManager.prototype = {
|
||||
this.onUpdateCallback = null;
|
||||
this.onRenderCallback = null;
|
||||
this.onPausedCallback = null;
|
||||
this.onResumedCallback = null;
|
||||
this.onDestroyCallback = null;
|
||||
}
|
||||
|
||||
@@ -861,6 +867,7 @@ Phaser.StateManager.prototype = {
|
||||
this.onPreRenderCallback = this.states[key]['preRender'] || null;
|
||||
this.onRenderCallback = this.states[key]['render'] || null;
|
||||
this.onPausedCallback = this.states[key]['paused'] || null;
|
||||
this.onResumedCallback = this.states[key]['resumed'] || null;
|
||||
|
||||
// Used when the state is no longer the current active state
|
||||
this.onShutDownCallback = this.states[key]['shutdown'] || this.dummy;
|
||||
@@ -909,7 +916,7 @@ Phaser.StateManager.prototype = {
|
||||
|
||||
if (this._created && this.onPausedCallback)
|
||||
{
|
||||
this.onPausedCallback.call(this.callbackContext, this.game, true);
|
||||
this.onPausedCallback.call(this.callbackContext, this.game);
|
||||
}
|
||||
|
||||
},
|
||||
@@ -920,9 +927,9 @@ Phaser.StateManager.prototype = {
|
||||
*/
|
||||
resume: function () {
|
||||
|
||||
if (this._created && this.onre)
|
||||
if (this._created && this.onResumedCallback)
|
||||
{
|
||||
this.onPausedCallback.call(this.callbackContext, this.game, false);
|
||||
this.onResumedCallback.call(this.callbackContext, this.game);
|
||||
}
|
||||
|
||||
},
|
||||
@@ -1009,6 +1016,7 @@ Phaser.StateManager.prototype = {
|
||||
this.onUpdateCallback = null;
|
||||
this.onRenderCallback = null;
|
||||
this.onPausedCallback = null;
|
||||
this.onResumedCallback = null;
|
||||
this.onDestroyCallback = null;
|
||||
|
||||
this.game = null;
|
||||
@@ -1041,7 +1049,7 @@ Phaser.StateManager.prototype.constructor = Phaser.StateManager;
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Fri Feb 21 2014 15:36:22 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Mon Feb 24 2014 12:11:34 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user