moveUpRight method

  1. @override
void moveUpRight(
  1. double speedX,
  2. double speedY, {
  3. VoidCallback? onCollision,
})
override

Move player to Up and Right

Implementation

@override
void moveUpRight(double speedX, double speedY, {VoidCallback? onCollision}) {
  if (animation?.runUpRight != null) {
    animation?.play(SimpleAnimationEnum.runUpRight);
  } else {
    animation?.play(SimpleAnimationEnum.runRight);
  }
  super.moveUpRight(speedX, speedY, onCollision: onCollision);
}