Skip to content

Commit 95dde9a

Browse files
committed
Finished the Game events
1 parent aa34185 commit 95dde9a

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/core/Game.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ var Game = new Class({
393393
texturesReady: function ()
394394
{
395395
// Start all the other systems
396-
this.events.emit('ready');
396+
this.events.emit(Events.READY);
397397

398398
this.start();
399399
},

src/core/events/READY_EVENT.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @author Richard Davey <rich@photonstorm.com>
3+
* @copyright 2019 Photon Storm Ltd.
4+
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
5+
*/
6+
7+
/**
8+
* The Game Ready Event.
9+
*
10+
* This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,
11+
* and all local systems are now able to start.
12+
*
13+
* @event Phaser.Core.Events#READY
14+
*/
15+
module.exports = 'ready';

src/core/events/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = {
2020
POST_STEP: require('./POST_STEP_EVENT'),
2121
PRE_RENDER: require('./PRE_RENDER_EVENT'),
2222
PRE_STEP: require('./PRE_STEP_EVENT'),
23+
READY: require('./READY_EVENT'),
2324
RESUME: require('./RESUME_EVENT'),
2425
STEP: require('./STEP_EVENT'),
2526
TEXTURES_READY: require('./TEXTURES_READY_EVENT'),

0 commit comments

Comments
 (0)