phaser/3.0.0/merge/states/State.js
2016-11-22 03:11:33 +00:00

51 lines
1 KiB
JavaScript

/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* A Base State Class.
*
* @class Phaser.State
* @constructor
*/
Phaser.State = function (config)
{
// The properties a State *must* have, that cannot be changed without breaking it:
this.game = null;
this.settings = new Phaser.State.Settings(this, config);
this.sys = new Phaser.State.Systems(this, config);
// Reference to sys.children, set during sys.init only
this.children;
};
Phaser.State.prototype.constructor = Phaser.State;
Phaser.State.prototype = {
// Can be overridden by your own States
preUpdate: function ()
{
},
// Can be overridden by your own States
update: function ()
{
},
// Can be overridden by your own States
postUpdate: function ()
{
},
// Can be overridden by your own States
render: function ()
{
}
};