remove method

  1. @override
void remove(
  1. ShapeHitbox item
)
override

Removes the item from the collision detection, if you just want to temporarily inactivate it you can set collisionType = CollisionType.inactive; instead.

Implementation

@override
void remove(ShapeHitbox item) {
  item.onAabbChanged = null;
  final listenerCollisionType = _listenerCollisionType[item];
  if (listenerCollisionType != null) {
    item.collisionTypeNotifier.removeListener(listenerCollisionType);
    _listenerCollisionType.remove(item);
  }

  super.remove(item);
}