From 680d0d50b189f453de481807bc20023cd9027564 Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Wed, 18 Dec 2024 15:01:57 +0000 Subject: [PATCH] Remove CameraComponentSystem onUpdate handler (#7208) * Remove CameraComponentSystem onUpdate handler * off the prerender event * Reorder destroy --- src/framework/components/camera/system.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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(); } }