onCollisionStart method

  1. @override
void onCollisionStart(
  1. Set<Vector2> intersectionPoints,
  2. PositionComponent other
)
override

onCollisionStart is called in the first tick when this object starts colliding with other.

Implementation

@override
void onCollisionStart(
    Set<Vector2> intersectionPoints, PositionComponent other) {
  if (other is CollisionMapComponent || other is TileWithCollision) {
    ++_tileCollisionCount;
    resetInterval(_tileCollisionCountKey);
  }
  super.onCollisionStart(intersectionPoints, other);
}