moveDown method

  1. @override
bool moveDown(
  1. double speed, {
  2. bool notifyOnMove = true,
})
override

Move player to Down

Implementation

@override
bool moveDown(double speed, {bool notifyOnMove = true}) {
  if (animation?.runDown != null) {
    animation?.play(SimpleAnimationEnum.runDown);
  } else {
    if (lastDirectionHorizontal == Direction.left) {
      animation?.play(SimpleAnimationEnum.runLeft);
    } else {
      animation?.play(SimpleAnimationEnum.runRight);
    }
  }

  return super.moveDown(speed, notifyOnMove: notifyOnMove);
}