phaser/v3/merge/states/State.js

52 lines
1 KiB
JavaScript
Raw Normal View History

2016-11-04 02:08:17 +00:00
/**
* @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)
2016-11-04 02:08:17 +00:00
{
// The properties a State *must* have, that cannot be changed without breaking it:
this.game = null;
this.settings = new Phaser.State.Settings(this, config);
2016-11-04 02:08:17 +00:00
this.sys = new Phaser.State.Systems(this, config);
// Reference to sys.children, set during sys.init only
this.children;
2016-11-04 02:08:17 +00:00
};
Phaser.State.prototype.constructor = Phaser.State;
Phaser.State.prototype = {
// Can be overridden by your own States
2016-11-04 02:08:17 +00:00
preUpdate: function ()
{
},
// Can be overridden by your own States
2016-11-04 02:08:17 +00:00
update: function ()
{
},
// Can be overridden by your own States
2016-11-04 02:08:17 +00:00
postUpdate: function ()
{
},
// Can be overridden by your own States
2016-11-04 02:08:17 +00:00
render: function ()
{
}
};