handleCollisionStart method

  1. @override
void handleCollisionStart(
  1. Set<Vector2> intersectionPoints,
  2. ShapeHitbox hitboxA,
  3. ShapeHitbox hitboxB
)
override

Calls the two colliding hitboxes when they first starts to collide. 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 handleCollisionStart(
  Set<Vector2> intersectionPoints,
  ShapeHitbox hitboxA,
  ShapeHitbox hitboxB,
) {
  hitboxA.onCollisionStart(intersectionPoints, hitboxB);
  hitboxB.onCollisionStart(intersectionPoints, hitboxA);
}