onCollision method

  1. @mustCallSuper
void onCollision(
  1. Set<Vector2> intersectionPoints,
  2. T other
)

onCollision is called in every tick when this object is colliding with other.

Implementation

@mustCallSuper
void onCollision(Set<Vector2> intersectionPoints, T other) {
  onCollisionCallback?.call(intersectionPoints, other);
}