mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 22:20:44 +00:00
The Game.registry
, which is a DataManager
instance that can be used as a global store of game wide data will now use its own Event Emitter, instead of the Game's Event Emitter. This means it's perfectly safe for you to now use the Registry to emit and listen for your own custom events without conflicting with events the Phaser Game instance emits.
This commit is contained in:
parent
8abfcd2f6f
commit
51d10677b1
1 changed files with 4 additions and 2 deletions
|
@ -187,13 +187,15 @@ var Game = new Class({
|
|||
this.cache = new CacheManager(this);
|
||||
|
||||
/**
|
||||
* An instance of the Data Manager
|
||||
* An instance of the Data Manager. This is a global manager, available from any Scene
|
||||
* and allows you to share and exchange your own game-level data or events without having
|
||||
* to use an internal event system.
|
||||
*
|
||||
* @name Phaser.Game#registry
|
||||
* @type {Phaser.Data.DataManager}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.registry = new DataManager(this);
|
||||
this.registry = new DataManager(this, new EventEmitter());
|
||||
|
||||
/**
|
||||
* An instance of the Input Manager.
|
||||
|
|
Loading…
Reference in a new issue