updateAnimation method
void
updateAnimation()
Implementation
void updateAnimation() {
if (!_comp.isMoving) {
return;
}
switch (_comp.direction) {
case Direction.left:
onPlayRunLeftAnimation();
break;
case Direction.right:
onPlayRunRightAnimation();
break;
case Direction.up:
onPlayRunUpAnimation();
break;
case Direction.down:
onPlayRunDownAnimation();
break;
case Direction.upLeft:
onPlayRunUpLeftAnimation();
break;
case Direction.upRight:
onPlayRunUpRightAnimation();
break;
case Direction.downLeft:
onPlayRunDownLeftAnimation();
break;
case Direction.downRight:
onPlayRunDownRightAnimation();
break;
}
}