| | 1 | | using DCL.Interface; |
| | 2 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Dynamic Skybox", fileName = "DynamicSkyboxControlControll |
| | 8 | | public class DynamicSkyboxControlController : ToggleSettingsControlController |
| | 9 | | { |
| | 10 | | // Start is called before the first frame update |
| 1 | 11 | | public override object GetStoredValue() { return currentGeneralSettings.dynamicProceduralSkybox; } |
| | 12 | |
|
| | 13 | | // Update is called once per frame |
| | 14 | | public override void UpdateSetting(object newValue) |
| | 15 | | { |
| 1 | 16 | | currentGeneralSettings.dynamicProceduralSkybox = (bool)newValue; |
| 1 | 17 | | if (currentGeneralSettings.dynamicProceduralSkybox) |
| | 18 | | { |
| 1 | 19 | | DataStore.i.skyboxConfig.useDynamicSkybox.Set(true); |
| 1 | 20 | | } |
| | 21 | | else |
| | 22 | | { |
| 0 | 23 | | DataStore.i.skyboxConfig.useDynamicSkybox.Set(false); |
| | 24 | | } |
| | 25 | |
|
| 1 | 26 | | CommonSettingsScriptableObjects.dynamicSkyboxDisabled.Set(currentGeneralSettings.dynamicProceduralSkybox); |
| 1 | 27 | | } |
| | 28 | | } |
| | 29 | | } |