示例#1
0
        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            CameraMotor motor = this.mainCamera ? CameraMotor.MAIN_MOTOR : this.cameraMotor;

            if (motor == null)
            {
                return(true);
            }

            CameraMotorTypeAdventure   motorTPS = motor.cameraMotorType as CameraMotorTypeAdventure;
            CameraMotorTypeFirstPerson motorFPS = motor.cameraMotorType as CameraMotorTypeFirstPerson;

            float x = this.pitch.GetValue(target);
            float y = this.yaw.GetValue(target);

            if (motorTPS != null)
            {
                motorTPS.AddRotation(y, x);
            }
            if (motorFPS != null)
            {
                motorFPS.AddRotation(y, x);
            }

            return(true);
        }
示例#2
0
        // 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);
        }