handleCollision method
void
handleCollision(
- Set<
Vector2> intersectionPoints, - ShapeHitbox hitboxA,
- ShapeHitbox hitboxB
override
Calls the two colliding hitboxes every tick when they are colliding.
They are called with the intersectionPoints
and instances of each other,
so that they can determine what hitbox (and what
ShapeHitbox.hitboxParent that they have collided with.
Implementation
@override
void handleCollision(
Set<Vector2> intersectionPoints,
ShapeHitbox hitboxA,
ShapeHitbox hitboxB,
) {
hitboxA.onCollision(intersectionPoints, hitboxB);
hitboxB.onCollision(intersectionPoints, hitboxA);
}