update method

void update(
  1. double primaryDelta
)

Implementation

void update(double primaryDelta) {
  Direction tmpDirection;

  if (primaryDelta > 0) {
    tmpDirection = Direction.down;
  } else {
    tmpDirection = Direction.up;
  }

  if (direction != null && tmpDirection != direction) {
    cancel = true;
  }

  direction = tmpDirection;
}