onRemove method
Called right before the component is removed from the game.
Implementation
@override
void onRemove() {
if (_parentSizeListener != null) {
hitboxParent.size.removeListener(_parentSizeListener!);
}
_transformAncestors.forEach((t) => t.removeListener(_transformListener));
_collisionDetection?.remove(this);
super.onRemove();
}