| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace DCL |
| | 4 | | { |
| | 5 | | public enum AvatarMaterialProfile |
| | 6 | | { |
| | 7 | | InWorld, |
| | 8 | | InEditor |
| | 9 | | } |
| | 10 | |
|
| | 11 | | public enum SkyboxMode |
| | 12 | | { |
| | 13 | | Dynamic, |
| | 14 | | HoursFixedByUser, |
| | 15 | | HoursFixedByWorld, |
| | 16 | | } |
| | 17 | |
|
| | 18 | | public class DataStore_SkyboxConfig |
| | 19 | | { |
| 11 | 20 | | public BaseVariable<bool> objectUpdated = new BaseVariable<bool>(false); |
| 11 | 21 | | public BaseVariable<string> configToLoad = new BaseVariable<string>("Generic_Skybox"); |
| 11 | 22 | | public BaseVariable<float> lifecycleDuration = new BaseVariable<float>(60); |
| 11 | 23 | | public BaseVariable<float> jumpToTime = new BaseVariable<float>(-1); |
| 11 | 24 | | public BaseVariable<float> updateReflectionTime = new BaseVariable<float>(-1); |
| 11 | 25 | | public BaseVariable<bool> disableReflection = new BaseVariable<bool>(false); |
| 11 | 26 | | public BaseVariable<float> currentVirtualTime = new BaseVariable<float>(); |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Use Fixed or Dynamic skybox |
| | 30 | | /// </summary> |
| 11 | 31 | | public BaseVariable<SkyboxMode> mode = new BaseVariable<SkyboxMode>(SkyboxMode.Dynamic); |
| 11 | 32 | | public BaseVariable<float> fixedTime = new BaseVariable<float>(0); |
| | 33 | |
|
| 11 | 34 | | public BaseVariable<int> reflectionResolution = new BaseVariable<int>(256); |
| 11 | 35 | | public BaseVariable<AvatarMaterialProfile> avatarMatProfile = new BaseVariable<AvatarMaterialProfile>(AvatarMate |
| | 36 | |
|
| | 37 | | public void UseFixedTimeFromSeconds(float timeInSeconds, SkyboxMode newMode) => |
| 6 | 38 | | UseFixedTimeFromHours((float)TimeSpan.FromSeconds(timeInSeconds).TotalHours, newMode); |
| | 39 | |
|
| | 40 | | public void UseFixedTimeFromHours(float timeInHours, SkyboxMode newMode) |
| | 41 | | { |
| 11 | 42 | | fixedTime.Set(timeInHours); |
| 11 | 43 | | this.mode.Set(newMode); |
| 11 | 44 | | } |
| | 45 | | } |
| | 46 | | } |