onCollisionStart method
onCollisionStart is called in the first tick when this object starts
colliding with other
.
Implementation
@override
void onCollisionStart(
Set<Vector2> intersectionPoints,
PositionComponent other,
) {
activeCollisions.add(other);
final otherEntity = _findEntity(other);
if (otherEntity == null) {
return;
}
for (final behavior in _propagateToBehaviors) {
if (behavior.isValid(otherEntity)) {
behavior.onCollisionStart(intersectionPoints, otherEntity);
}
}
return super.onCollisionStart(intersectionPoints, other);
}