fuseCollisionStart<C extends PositionComponent> function

void fuseCollisionStart<C extends PositionComponent>(
  1. FuseCollisionFn<C> fn
)

Calls fn when this component collides with another component of type C.

Implementation

void fuseCollisionStart<C extends PositionComponent>(FuseCollisionFn<C> fn) {
  _fuseCollisionsCheck();
  final component = fuseComponent<FuseCollisions>();

  component._collisionStartFns.add((target) {
    if (target is C) {
      fn(target);
    }
  });
}