void Start() { if (this.CameraControllers.Count == 0) { this.enabled = false; throw new ArgumentException("There are no camera controllers attached to this Multi CameraController."); } if (PositionLerpTransformer == null) { PositionLerpTransformer = new DoNothingLerpTransformer(); } if (RotationLerpTransformer == null) { RotationLerpTransformer = new DoNothingLerpTransformer(); } _currentCameraIndex = CurrentIndex; _switchBeginTime = -SwitchSpeed; if (CurrentIndex < 0 || CurrentIndex > CameraControllers.Count + 1) { this.enabled = false; throw new ArgumentOutOfRangeException("The index: " + CurrentIndex + " is not a valid index for a Camera."); } foreach (var cam in CameraControllers) { cam.enabled = false; } }
public override void Initialize(CameraController cameraController) { base.Initialize(cameraController); IsHeadbobbing = false; Forced = false; Reorienting = false; _headbobReorientStartTime = -ReadjustToNormalTime; ReorientingLerpTransformer = new DoNothingLerpTransformer(); }
private void OnTriggerEnter(Collider other) { ILerpTransformer lerp = SmoothRotation ? (ILerpTransformer) new SmoothInOutLerpTransformer() : new DoNothingLerpTransformer(); if (StyleOfRotation == TESTSCENE_RotationStyle.RotateBy) { SideScroller.Rotation.AutoRotateBy(HorizontalAmountToRotate, VerticalAmountToRotate, TimeToRotate, lerp); } else { SideScroller.Rotation.AutoRotateTo(HorizontalAmountToRotate, VerticalAmountToRotate, TimeToRotate, lerp); } }
public override void Initialize(CameraController cameraController) { base.Initialize(cameraController); _target = GetCameraComponent <TargetComponent>(); _previouslyDeterminedRotation = _target.Target.rotation; _previousTargetState = new VirtualTransform(_target.Target); _finishedAdjustment = true; _forceAdjustment = false; FixOffsets(); if (RotationLerpTransformer == null) { RotationLerpTransformer = new DoNothingLerpTransformer(); } }
public override void Initialize(Typo.Utilities.Cameras.CameraController cameraController) { base.Initialize(cameraController); ZoomLerpTransformer = new DoNothingLerpTransformer(); }