moveUpLeft method

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

Move player to Up and Left

Implementation

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