onCollisionEnd method

  1. @override
  2. @mustCallSuper
void onCollisionEnd(
  1. ShapeHitbox other
)
override

onCollisionEnd is called once when this object has stopped colliding with other.

Implementation

@override
@mustCallSuper
void onCollisionEnd(ShapeHitbox other) {
  activeCollisions.remove(other);
  onCollisionEndCallback?.call(other);
  if (hitboxParent is CollisionCallbacks &&
      triggersParentCollision &&
      other.triggersParentCollision) {
    (hitboxParent as CollisionCallbacks).onCollisionEnd(other.hitboxParent);
  }
}