CameraConfig constructor
CameraConfig({
- bool moveOnlyMapArea = false,
- bool startFollowPlayer = true,
- double zoom = 1.0,
- double angle = 0.0,
- GameComponent? target,
- double speed = 5,
- InitialMapZoomFitEnum initialMapZoomFit = InitialMapZoomFitEnum.none,
- Vector2? initPosition,
- Vector2? movementWindow,
- 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;