copyWith method

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

Implementation

CameraConfig copyWith({
  Vector2? movementWindow,
  bool? moveOnlyMapArea,
  double? zoom,
  double? angle,
  GameComponent? target,
  double? speed,
  bool? startFollowPlayer,
  InitialMapZoomFitEnum? initialMapZoomFit,
  Vector2? initPosition,
  Vector2? resolution,
}) {
  return CameraConfig(
    movementWindow: movementWindow ?? this.movementWindow,
    moveOnlyMapArea: moveOnlyMapArea ?? this.moveOnlyMapArea,
    zoom: zoom ?? this.zoom,
    angle: angle ?? this.angle,
    target: target ?? this.target,
    speed: speed ?? this.speed,
    startFollowPlayer: startFollowPlayer ?? this.startFollowPlayer,
    initialMapZoomFit: initialMapZoomFit ?? this.initialMapZoomFit,
    initPosition: initPosition ?? this.initPosition,
    resolution: resolution ?? this.resolution,
  );
}