< 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

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    {
 5220        public BaseVariable<bool> objectUpdated = new BaseVariable<bool>(false);
 5221        public BaseVariable<string> configToLoad = new BaseVariable<string>("Generic Skybox");
 5222        public BaseVariable<float> lifecycleDuration = new BaseVariable<float>(60);
 5223        public BaseVariable<float> jumpToTime = new BaseVariable<float>(-1);
 5224        public BaseVariable<float> updateReflectionTime = new BaseVariable<float>(-1);
 5225        public BaseVariable<bool> disableReflection = new BaseVariable<bool>(false);
 5226        public BaseVariable<float> currentVirtualTime = new BaseVariable<float>();
 27
 28        /// <summary>
 29        /// Use Fixed or Dynamic skybox
 30        /// </summary>
 5231        public BaseVariable<SkyboxMode> mode = new BaseVariable<SkyboxMode>(SkyboxMode.Dynamic);
 5232        public BaseVariable<float> fixedTime = new BaseVariable<float>(0);
 33
 5234        public BaseVariable<int> reflectionResolution = new BaseVariable<int>(256);
 5235        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}