diff --git a/src/framework/components/camera/system.js b/src/framework/components/camera/system.js index 21ae340e601..6e66a97320e 100644 --- a/src/framework/components/camera/system.js +++ b/src/framework/components/camera/system.js @@ -44,8 +44,6 @@ class CameraComponentSystem extends ComponentSystem { this.on('beforeremove', this.onBeforeRemove, this); this.app.on('prerender', this.onAppPrerender, this); - - this.app.systems.on('update', this.onUpdate, this); } initializeComponentData(component, data, properties) { @@ -153,9 +151,6 @@ class CameraComponentSystem extends ComponentSystem { component.onRemove(); } - onUpdate(dt) { - } - onAppPrerender() { for (let i = 0, len = this.cameras.length; i < len; i++) { this.cameras[i].onAppPrerender(); @@ -176,9 +171,9 @@ class CameraComponentSystem extends ComponentSystem { } destroy() { - super.destroy(); + this.app.off('prerender', this.onAppPrerender, this); - this.app.systems.off('update', this.onUpdate, this); + super.destroy(); } }