// EXECUTABLE: ---------------------------------------------------------------------------- public override bool InstantExecute(GameObject target, IAction[] actions, int index) { CameraMotor motor = (this.mainCameraMotor ? CameraMotor.MAIN_MOTOR : this.cameraMotor); if (motor != null && motor.cameraMotorType.GetType() == typeof(CameraMotorTypeAdventure)) { CameraMotorTypeAdventure adventureMotor = (CameraMotorTypeAdventure)motor.cameraMotorType; adventureMotor.allowOrbitInput = this.allowOrbitInput; adventureMotor.allowZoom = this.allowZoom; adventureMotor.avoidWallClip = this.avoidWallClip; } return(!this.changeTargetOffset && !this.changePivotOffset); }
// INITIALIZE: ---------------------------------------------------------------------------- private void Awake() { if (this.isMainCameraMotor) { MAIN_MOTOR = this; } this.cameraMotorType.Initialize(this); Camera attachedCamera = GetComponent <Camera>(); if (attachedCamera != null) { attachedCamera.enabled = false; } }
// EXECUTABLE: ---------------------------------------------------------------------------- public override bool InstantExecute(GameObject target, IAction[] actions, int index) { CameraMotor motor = (this.mainCameraMotor ? CameraMotor.MAIN_MOTOR : this.cameraMotor); if (motor != null && motor.cameraMotorType.GetType() == typeof(CameraMotorTypeFirstPerson)) { CameraMotorTypeFirstPerson fpsMotor = (CameraMotorTypeFirstPerson)motor.cameraMotorType; fpsMotor.positionOffset = this.positionOffset; fpsMotor.headbobPeriod = this.period; fpsMotor.headbobAmount = this.amount; fpsMotor.modelManipulator = this.modelManipulator; } return(true); }
// EXECUTABLE: ---------------------------------------------------------------------------- public override bool InstantExecute(GameObject target, IAction[] actions, int index) { CameraMotor motor = (this.mainCameraMotor ? CameraMotor.MAIN_MOTOR : this.cameraMotor); if (motor != null && motor.cameraMotorType.GetType() == typeof(CameraMotorTypeTarget)) { CameraMotorTypeTarget targetMotor = (CameraMotorTypeTarget)motor.cameraMotorType; targetMotor.anchorDistance = this.anchorDistance; targetMotor.horizontalOffset = this.horizontalOffset; targetMotor.anchor = this.anchor; targetMotor.target = this.target; } return(true); }
// EXECUTABLE: ---------------------------------------------------------------------------- public override bool InstantExecute(GameObject target, IAction[] actions, int index) { if (HookCamera.Instance != null) { CameraController cameraController = HookCamera.Instance.Get <CameraController>(); if (cameraController != null) { CameraMotor motor = null; if (this.mainCameraMotor) { motor = CameraMotor.MAIN_MOTOR; } else { switch (this.from) { case CameraMotorFrom.CameraMotor: motor = this.cameraMotor; break; case CameraMotorFrom.Variable: GameObject value = this.variable.Get(target) as GameObject; if (value != null) { motor = value.GetComponent <CameraMotor>(); } break; } } if (motor != null) { cameraController.ChangeCameraMotor( motor, this.transitionTime ); } } } return(true); }
// INITIALIZE: ---------------------------------------------------------------------------- public void Initialize(CameraMotor cameraMotor) { this.cameraMotor = cameraMotor; }