onBlockedMovement method

  1. @override
void onBlockedMovement(
  1. PositionComponent other,
  2. CollisionData collisionData
)
override

Implementation

@override
void onBlockedMovement(
  PositionComponent other,
  CollisionData collisionData,
) {
  if (isJumping &&
      lastDirectionVertical.isDownSide &&
      collisionData.direction.isDownSide) {
    _currentJumps = 0;
    isJumping = false;
  }
  super.onBlockedMovement(other, collisionData);
}