moveUpRight method

void moveUpRight({
  1. double? speed,
})

Move player to Up and Right

Implementation

void moveUpRight({double? speed}) {
  _lastSpeed = (speed ?? this.speed) * diaginalReduction;
  velocity = Vector2(_lastSpeed, -_lastSpeed);
}