idle method
Implementation
@override
void idle() {
super.idle();
switch (lastDirection) {
case Direction.left:
onPlayIdleLeftAnimation();
break;
case Direction.right:
onPlayIdleRightAnimation();
break;
case Direction.up:
onPlayIdleUpAnimation();
break;
case Direction.down:
onPlayIdleDownAnimation();
break;
case Direction.upLeft:
onPlayIdleUpLeftAnimation();
break;
case Direction.upRight:
onPlayIdleUpRightAnimation();
break;
case Direction.downLeft:
onPlayIdleDownLeftAnimation();
break;
case Direction.downRight:
onPlayIdleDownRightAnimation();
break;
}
}