mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
EE registered as a plugin
This commit is contained in:
parent
776d178b38
commit
abdbe2d1ee
1 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
var Class = require('../utils/Class');
|
||||
var EE = require('eventemitter3');
|
||||
var PluginManager = require('../plugins/PluginManager');
|
||||
|
||||
// Phaser.EventEmitter
|
||||
|
||||
|
@ -12,8 +13,20 @@ var EventEmitter = new Class({
|
|||
function EventEmitter ()
|
||||
{
|
||||
EE.call(this);
|
||||
},
|
||||
|
||||
shutdown: function ()
|
||||
{
|
||||
this.removeAllListeners();
|
||||
},
|
||||
|
||||
destroy: function ()
|
||||
{
|
||||
this.removeAllListeners();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
PluginManager.register('EventEmitter', EventEmitter, 'events');
|
||||
|
||||
module.exports = EventEmitter;
|
||||
|
|
Loading…
Reference in a new issue