Example #1
0
        void Update()
        {
            if (FsmManager.PlayerComputer && Input.GetKeyDown(KeyCode.Return) && typer != null)
            {
                StartCoroutine(Computer());
            }

            if (!MOP.DynamicDrawDistance.Value)
            {
                return;
            }

            float toGoDrawDistance = FsmManager.GetDrawDistance();

            if (player.position.y > 20)
            {
                toGoDrawDistance *= 2;
            }
            else if (Hypervisor.Instance.IsInSector())
            {
                toGoDrawDistance /= 2;
            }

            mainCamera.farClipPlane = Mathf.Lerp(mainCamera.farClipPlane, toGoDrawDistance, Time.deltaTime * .5f);
        }