public void UpdateNew()
        {
            if (!ConfigHasBeenInit)
            {
                ConfigHasBeenInit = true;
                MaxZoom           = UserConfig.GetValueAsFloat("CameraZoomMod", "MaxZoom");
                m_targetZoomLevel = 1.0f;
            }

            if (Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.Z))
            {
                m_targetZoomLevel = 1.0f;
            }


            if (this.ScreenWidth != this.m_previousScreenWidth || this.ScreenHeight != this.m_previousScreenHeight)
            {
                this.m_previousScreenWidth  = this.ScreenWidth;
                this.m_previousScreenHeight = this.ScreenHeight;
                this.SetZoomLevel(this.GetZoomLevel(), true);
            }
            bool flag = this.m_currentZoomLevel != this.m_targetZoomLevel;

            this.m_currentZoomLevel = Mathf.Lerp(this.m_currentZoomLevel, this.m_targetZoomLevel, Mathf.Clamp01(TimeController.UnscaledDeltaTime * this.ZoomLerpStrength));
            if (flag)
            {
                this.UpdateZoom();
            }
        }
Beispiel #2
0
        public void OnyxStartNew()
        {
            UseMod              = UserConfig.GetValueAsBool("GameSpeedMod", "enableMod");
            ToggleMaxGameSpeed  = UserConfig.GetValueAsFloat("GameSpeedMod", "toggleGameSpeed");
            MaxGameSpeedSetting = UserConfig.GetValueAsFloat("GameSpeedMod", "maxGameSpeed");
            PrintSpeed          = UserConfig.GetValueAsBool("GameSpeedMod", "PrintSpeed");
            Config              = MaxGameSpeedSetting.ToString();

            this.m_TimeScale = this.NormalTime;
        }