joystickChangeDirectional method

  1. @override
void joystickChangeDirectional(
  1. JoystickDirectionalEvent event
)
override

Implementation

@override
void joystickChangeDirectional(JoystickDirectionalEvent event) {
  super.joystickChangeDirectional(event);
  if (event.directional != JoystickMoveDirectional.IDLE && !isDead) {
    this.animation = animRun;
  } else {
    this.animation = animIdle;
  }
}