onJump method

  1. @override
void onJump(
  1. JumpingStateEnum state
)
override

Implementation

@override
void onJump(JumpingStateEnum state) {
  super.onJump(state);
  if (state == JumpingStateEnum.idle) {
    if (lastDirectionHorizontal == Direction.left) {
      animation?.play(SimpleAnimationEnum.idleLeft);
    } else {
      animation?.play(SimpleAnimationEnum.idleRight);
    }
  }
}