moveLeftOnce method

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

Implementation

void moveLeftOnce({double? speed}) {
  _lastSpeed = speed ?? this.speed;
  setVelocityAxis(x: -_lastSpeed);
  onApplyDisplacement(dtUpdate);
  _velocity.add(Vector2(_lastSpeed, 0));
  setVelocityAxis(x: 0);
}