< Summary

Class:DCL.DataStore_SkyboxConfig
Assembly:DataStore
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_SkyboxConfig.cs
Covered lines:15
Uncovered lines:0
Coverable lines:15
Total lines:46
Line coverage:100% (15 of 15)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:3
Method coverage:100% (3 of 3)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DataStore_SkyboxConfig()0%110100%
UseFixedTimeFromSeconds(...)0%110100%
UseFixedTimeFromHours(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DataStore/DataStore_SkyboxConfig.cs

#LineLine coverage
 1using System;
 2
 3namespace 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    {
 1120        public BaseVariable<bool> objectUpdated = new BaseVariable<bool>(false);
 1121        public BaseVariable<string> configToLoad = new BaseVariable<string>("Generic_Skybox");
 1122        public BaseVariable<float> lifecycleDuration = new BaseVariable<float>(60);
 1123        public BaseVariable<float> jumpToTime = new BaseVariable<float>(-1);
 1124        public BaseVariable<float> updateReflectionTime = new BaseVariable<float>(-1);
 1125        public BaseVariable<bool> disableReflection = new BaseVariable<bool>(false);
 1126        public BaseVariable<float> currentVirtualTime = new BaseVariable<float>();
 27
 28        /// <summary>
 29        /// Use Fixed or Dynamic skybox
 30        /// </summary>
 1131        public BaseVariable<SkyboxMode> mode = new BaseVariable<SkyboxMode>(SkyboxMode.Dynamic);
 1132        public BaseVariable<float> fixedTime = new BaseVariable<float>(0);
 33
 1134        public BaseVariable<int> reflectionResolution = new BaseVariable<int>(256);
 1135        public BaseVariable<AvatarMaterialProfile> avatarMatProfile = new BaseVariable<AvatarMaterialProfile>(AvatarMate
 36
 37        public void UseFixedTimeFromSeconds(float timeInSeconds, SkyboxMode newMode) =>
 638            UseFixedTimeFromHours((float)TimeSpan.FromSeconds(timeInSeconds).TotalHours, newMode);
 39
 40        public void UseFixedTimeFromHours(float timeInHours, SkyboxMode newMode)
 41        {
 1142            fixedTime.Set(timeInHours);
 1143            this.mode.Set(newMode);
 1144        }
 45    }
 46}