| | 1 | | using DCL; |
| | 2 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Max HQ Avatars", fileName = "MaxHQAvatarsControlControlle |
| | 8 | | public class MaxHQAvatarsControlController : SliderSettingsControlController |
| | 9 | | { |
| | 10 | | public override void Initialize() |
| | 11 | | { |
| 1 | 12 | | base.Initialize(); |
| 1 | 13 | | DataStore.i.avatarsLOD.maxAvatars.Set(currentQualitySetting.maxHQAvatars); |
| 1 | 14 | | } |
| | 15 | |
|
| 1 | 16 | | public override object GetStoredValue() { return currentQualitySetting.maxHQAvatars; } |
| | 17 | |
|
| | 18 | | public override void UpdateSetting(object newValue) |
| | 19 | | { |
| 1 | 20 | | int valueAsInt = (int)(float)newValue; |
| 1 | 21 | | currentQualitySetting.maxHQAvatars = valueAsInt; |
| 1 | 22 | | DataStore.i.avatarsLOD.maxAvatars.Set(valueAsInt); |
| 1 | 23 | | } |
| | 24 | | } |
| | 25 | | } |