fuseCollisionPoints<C extends PositionComponent> function
Calls fn
when this component is colliding with another component of type C
.
This version also returns the points at which the collision occurred.
Implementation
void fuseCollisionPoints<C extends PositionComponent>(FuseCollisionPointsFn<C> fn) {
_fuseCollisionsCheck();
final component = fuseComponent<FuseCollisions>();
component._collisionPointsFns.add((target, points) {
if (target is C) {
fn(target, points);
}
});
}