Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
unregisterPhysicsEvents() {
Events.off(this.engine, 'collisionStart', this.onCollisionStart);
}
componentWillUnmount() {
this.context.loop.unsubscribe(this.loopID);
Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
Events.off(this.engine, 'collisionStart', this.props.onCollision);
}
componentWillUnmount() {
this.context.loop.unsubscribe(this.loopID);
Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
Events.off(this.engine, 'collisionStart', this.props.onCollision);
}
componentWillUnmount() {
this.context.loop.unsubscribe(this.loopID);
Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
Events.off(this.engine, 'collisionStart', this.props.onCollision);
}
componentWillUnmount() {
this.context.loop.unsubscribe(this.loopID);
Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
Events.off(this.engine, 'collisionStart', this.props.onCollision);
}