onCollisionStart method

  1. @override
  2. @mustCallSuper
void onCollisionStart(
  1. Set<Vector2> intersectionPoints,
  2. PositionComponent other
)

onCollisionStart is called in the first tick when this object starts colliding with other.

Implementation

@override
@mustCallSuper
void onCollisionStart(Set<Vector2> intersectionPoints, PositionComponent other) {
  super.onCollisionStart(intersectionPoints, other);

  for (final fn in _collisionStartFns) {
    fn(other);
  }

  for (final fn in _collisionStartPointsFns) {
    fn(other, intersectionPoints);
  }
}