Finished the Game events

This commit is contained in:
Richard Davey 2019-01-15 16:27:32 +00:00
parent aa341854c7
commit 95dde9a320
3 changed files with 17 additions and 1 deletions

View file

@ -393,7 +393,7 @@ var Game = new Class({
texturesReady: function ()
{
// Start all the other systems
this.events.emit('ready');
this.events.emit(Events.READY);
this.start();
},

View file

@ -0,0 +1,15 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* The Game Ready Event.
*
* This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,
* and all local systems are now able to start.
*
* @event Phaser.Core.Events#READY
*/
module.exports = 'ready';

View file

@ -20,6 +20,7 @@ module.exports = {
POST_STEP: require('./POST_STEP_EVENT'),
PRE_RENDER: require('./PRE_RENDER_EVENT'),
PRE_STEP: require('./PRE_STEP_EVENT'),
READY: require('./READY_EVENT'),
RESUME: require('./RESUME_EVENT'),
STEP: require('./STEP_EVENT'),
TEXTURES_READY: require('./TEXTURES_READY_EVENT'),