EE registered as a plugin

This commit is contained in:
Richard Davey 2018-01-18 05:19:00 +00:00
parent 776d178b38
commit abdbe2d1ee

View file

@ -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;