コード例 #1
0
        private void CalcFinalOutput(PlayerEntity player, DummyCameraMotorInput input,
                                     CameraStateOutputNewComponent finalOutput, DummyCameraMotorState state)
        {
            player.cameraConfigNow.Config     = state.GetMainConfig();
            player.cameraConfigNow.PeekConfig = SingletonManager.Get <CameraConfigManager>().Config.PeekConfig;
            player.cameraConfigNow.DeadConfig = SingletonManager.Get <CameraConfigManager>().Config.DeadConfig;
            _output.Init();
            _output.ArchorPosition =
                player.cameraArchor.ArchorPosition +
                player.cameraArchor.ArchorTransitionOffsetPosition;
            _output.ArchorEulerAngle = player.cameraArchor.ArchorEulerAngle;

            for (int i = 0; i < (int)SubCameraMotorType.End; i++)
            {
                var type = (SubCameraMotorType)i;
                _output.Append(CalcSubFinalCamera(player, input, state, _motors.GetDict(type), state.Get(type),
                                                  player.time.ClientTime));
            }

            finalOutput.ArchorPosition   = _output.ArchorPosition;
            finalOutput.ArchorEulerAngle = _output.ArchorEulerAngle;
            finalOutput.ArchorOffset     = _output.ArchorOffset;
            finalOutput.ArchorPostOffset = _output.ArchorPostOffset;
            finalOutput.EulerAngle       = _output.EulerAngle;
            finalOutput.Offset           = _output.Offset;
            finalOutput.PostOffset       = _output.PostOffset;
            finalOutput.Fov  = _output.Fov;
            finalOutput.Far  = _output.Far;
            finalOutput.Near = _output.Near;

            SmoothFov(player);
        }
コード例 #2
0
        private void CalcFinalOutput(PlayerEntity player, DummyCameraMotorInput input,
                                     CameraStateOutputNewComponent finalOutput, DummyCameraMotorState state)
        {
            _output.Init();
            _output.ArchorPosition =
                player.cameraArchor.ArchorPosition +
                player.cameraArchor.ArchorTransitionOffsetPosition;
            _output.ArchorEulerAngle = player.cameraArchor.ArchorEulerAngle;

            for (int i = 0; i < (int)SubCameraMotorType.End; i++)
            {
                var type = (SubCameraMotorType)i;
                _output.Append(CalcSubFinalCamera(player, input, state, _motors.GetDict(type), state.Get(type),
                                                  player.time.ClientTime));
            }

            finalOutput.ArchorPosition   = _output.ArchorPosition;
            finalOutput.ArchorEulerAngle = _output.ArchorEulerAngle;
            finalOutput.ArchorOffset     = _output.ArchorOffset;
            finalOutput.ArchorPostOffset = _output.ArchorPostOffset;
            finalOutput.EulerAngle       = _output.EulerAngle;
            finalOutput.Offset           = _output.Offset;
            finalOutput.PostOffset       = _output.PostOffset;
            finalOutput.Fov  = _output.Fov;
            finalOutput.Far  = _output.Far;
            finalOutput.Near = _output.Near;
            finalOutput.NeedDetectDistance = !_output.ForbidDetect;

            SmoothFov(player, input.GetViewConfig());
        }