CameraConfig constructor

CameraConfig({
  1. bool moveOnlyMapArea = false,
  2. bool startFollowPlayer = true,
  3. double zoom = 1.0,
  4. double angle = 0.0,
  5. GameComponent? target,
  6. double speed = 5,
  7. InitialMapZoomFitEnum initialMapZoomFit = InitialMapZoomFitEnum.none,
  8. Vector2? initPosition,
  9. Vector2? movementWindow,
  10. Vector2? resolution,
})

Implementation

CameraConfig({
  this.moveOnlyMapArea = false,
  this.startFollowPlayer = true,
  this.zoom = 1.0,
  this.angle = 0.0,
  this.target,
  this.speed = 5, // no smoth speed sets double.infinity
  this.initialMapZoomFit = InitialMapZoomFitEnum.none,
  this.initPosition,
  Vector2? movementWindow,
  this.resolution,
}) : movementWindow = movementWindow ?? movementWindowDefault;