private IMovementDirection SetCameraDirection(CameraView cameraView) { this.cameraView = cameraView; return(cameraView switch { CameraView.AlwaysForward => new ThirdPersonCameraDirection(), _ => new ThirdPersonCameraDirection() });
private IMovementDirection setCameraDirection(CameraView cameraView) { this.cameraView = cameraView; switch (cameraView) { case CameraView.AlwaysForward: return(new ThirdPersonCameraDirection()); default: return(new ThirdPersonCameraDirection()); } }
public void changeMovementDirection(CameraView cameraView) { movementDirection = setCameraDirection(cameraView); }