onCollision method
onCollision is called in every tick when this object is colliding with
other
.
Implementation
@override
void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {
if (other is T) {
if (sensorEnabled) {
if (checkInterval(
_sensorIntervalKey,
_intervalCallback,
lastDt,
)) {
onContact(other);
}
}
}
super.onCollision(intersectionPoints, other);
}