From abdbe2d1eecc7ab877359fcf553e0ee9d4580ca8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 18 Jan 2018 05:19:00 +0000 Subject: [PATCH] EE registered as a plugin --- src/events/EventEmitter.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/events/EventEmitter.js b/src/events/EventEmitter.js index fed867cc9..1193bd59f 100644 --- a/src/events/EventEmitter.js +++ b/src/events/EventEmitter.js @@ -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;