onCollision method
onCollision is called in every tick when this object is colliding with
other
.
Implementation
@override
@mustCallSuper
void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {
super.onCollision(intersectionPoints, other);
for (final fn in _collisionFns) {
fn(other);
}
for (final fn in _collisionPointsFns) {
fn(other, intersectionPoints);
}
}