Esempio n. 1
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();
        }
        public static void Init(SettingsSystem settingsSystem, GlobalSettings initSettings, AudioManager audioManager, AudioSettingsHandler audioSettingsHandler, TimeController timeController)
        {
            audioManager.SetTimeContoller(timeController);

            var ush = Object.FindObjectOfType <UnitySettingsHandler>();

            Debug.Assert(ush != null, "Can't find UnitySettingsHandler");

            ush.Init(settingsSystem, initSettings);
            audioSettingsHandler.Init(audioManager, settingsSystem, initSettings);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 /// <summary>
 /// Called after initializing all settings.
 /// In this method should be all subscription to other settings.
 /// </summary>
 public virtual void Init(SettingsSystem settingsSystem)
 {
 }