2018-01-12 18:59:01 +00:00
|
|
|
var Class = require('../utils/Class');
|
|
|
|
var EE = require('eventemitter3');
|
2018-01-18 05:19:00 +00:00
|
|
|
var PluginManager = require('../plugins/PluginManager');
|
2018-01-12 18:59:01 +00:00
|
|
|
|
|
|
|
// Phaser.EventEmitter
|
|
|
|
|
|
|
|
var EventEmitter = new Class({
|
|
|
|
|
|
|
|
Extends: EE,
|
|
|
|
|
|
|
|
initialize:
|
|
|
|
|
|
|
|
function EventEmitter ()
|
|
|
|
{
|
|
|
|
EE.call(this);
|
2018-01-18 05:19:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
shutdown: function ()
|
|
|
|
{
|
|
|
|
this.removeAllListeners();
|
|
|
|
},
|
|
|
|
|
|
|
|
destroy: function ()
|
|
|
|
{
|
|
|
|
this.removeAllListeners();
|
2018-01-12 18:59:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2018-01-18 05:19:00 +00:00
|
|
|
PluginManager.register('EventEmitter', EventEmitter, 'events');
|
|
|
|
|
2018-01-12 18:59:01 +00:00
|
|
|
module.exports = EventEmitter;
|