Пример #1
0
        public void OnTick(float dt)
        {
            TickUserInputs(dt);
            if (this._isEnabled && this._isRotatingCharacter)
            {
                this.UpdateCharacterRotation((int)Input.MouseMoveX);
            }
            if (this._animationFrequencyThreshold > this._animationGap)
            {
                this._animationGap += dt;
            }
            if (this._isEnabled && this._agentVisuals != null)
            {
                this._agentVisuals.TickVisuals();
            }
            TableauView view = this.View;

            if (view != null)
            {
                if (this._continuousRenderCamera == null)
                {
                    this._continuousRenderCamera = Camera.CreateCamera();
                }
                view.SetDoNotRenderThisFrame(false);
            }
        }
Пример #2
0
        internal void CharacterTableauContinuousRenderFunction(Texture sender, EventArgs e)
        {
            Scene       scene       = (Scene)sender.UserData;
            TableauView tableauView = sender.TableauView;

            if (scene == null)
            {
                tableauView.SetContinuousRendering(false);
                tableauView.SetDeleteAfterRendering(true);
                return;
            }
            scene.EnsurePostfxSystem();
            scene.SetDofMode(false);
            scene.SetMotionBlurMode(false);
            scene.SetBloom(true);
            scene.SetDynamicShadowmapCascadesRadiusMultiplier(0.31f);
            tableauView.SetRenderWithPostfx(true);
            float       cameraRatio = this._cameraRatio;
            MatrixFrame camPos      = this._camPos;

            if (this._continuousRenderCamera != null)
            {
                Camera continuousRenderCamera = this._continuousRenderCamera;
                this._continuousRenderCamera = null;
                continuousRenderCamera.SetFovVertical(0.7853982f, cameraRatio, 0.2f, 200f);
                continuousRenderCamera.Frame = camPos;
                tableauView.SetCamera(continuousRenderCamera);
                tableauView.SetScene(scene);
                tableauView.SetSceneUsesSkybox(false);
                tableauView.SetDeleteAfterRendering(false);
                tableauView.SetContinuousRendering(true);
                tableauView.SetDoNotRenderThisFrame(true);
                tableauView.SetClearColor(0u);
                tableauView.SetFocusedShadowmap(true, ref this._frame.origin, 1.55f);
            }
        }