phaser/src/events/EventEmitter.js

33 lines
539 B
JavaScript
Raw Normal View History

var Class = require('../utils/Class');
var EE = require('eventemitter3');
2018-01-18 05:19:00 +00:00
var PluginManager = require('../plugins/PluginManager');
// 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-18 05:19:00 +00:00
PluginManager.register('EventEmitter', EventEmitter, 'events');
module.exports = EventEmitter;