onJoystickChangeDirectional method
Implementation
@override
void onJoystickChangeDirectional(JoystickDirectionalEvent event) {
super.onJoystickChangeDirectional(event);
if (event.directional == JoystickMoveDirectional.IDLE) {
_isRunning = false;
setAnimation(animIdle);
} else if (!isDead && !_isRunning) {
_isRunning = true;
setAnimation(animRun);
}
}