moveDownRight method

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

Move player to Down and Right

Implementation

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