Example #1
0
        public void Init(AudioManager audioManager, SettingsSystem settingsSystem, GlobalSettings initSettings)
        {
            this.audioManager   = audioManager;
            this.settingsSystem = settingsSystem;

            // sound
            settingsSystem.Subscribe(SettingsList.Setting_Key_Audio_MusicVolume, SetMusicVolume);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Audio_SoundVolume, SetSoundVolume);

            // init values
            SetMusicVolume(initSettings);
            SetSoundVolume(initSettings);
        }
Example #2
0
        public void Init(SettingsSystem settingsSystem, GlobalSettings initSettings)
        {
            if (GraphicsSettings.renderPipelineAsset != null)
            {
                GraphicsSettings.renderPipelineAsset = shadowsLow;
            }

            this.settingsSystem       = settingsSystem;
            this.currentPipelineAsset = (URPA)GraphicsSettings.renderPipelineAsset;

            // when preset is changed this settings must be set
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_Preset, SetShadows);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_Preset, SetMSAA);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_Preset, SetLOD);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_Preset, SetRenderScale);

            // performance
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_ShadowQuality, SetShadows);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_Msaa, SetMSAA);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_LodMult, SetLOD);
            settingsSystem.Subscribe(SettingsList.Setting_Key_Perf_ResolutionMult, SetRenderScale);

            // when cutscene starts or ends, set specific shadow distance
            CutsceneManager.OnCutsceneStart += SetCutsceneShadowDistance;
            CutsceneManager.OnCutsceneEnd   += SetDefaultShadowDistance;

            // apply initSettings, as actual settings are not applied at the start
            SetShadows(initSettings);
            SetMSAA(initSettings);
            SetLOD(initSettings);
            SetRenderScale(initSettings);
            SetDefaultShadowDistance();
        }