< Summary

Class:HouseController
Assembly:Assembly-CSharp
File(s):File 1: D:/--UnityProject/VR/_____ISSTA 26/Island-Visualizer-PCVR/Assets/Scripts/Test/HouseController.cs
File 2: E:/Unity/Unity Project/Island-Visualizer-PCVR/Assets/Scripts/Test/HouseController.cs
Covered lines:36
Uncovered lines:10
Coverable lines:46
Total lines:46
Line coverage:78.2% (36 of 46)
Covered branches:0
Total branches:0
Covered methods:8
Total methods:8
Method coverage:100% (8 of 8)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
File 1: HouseController()0%000100%
File 1: Start()0%000100%
File 1: Update()0%00037.5%
File 1: changeLights()0%00092.86%
File 2: HouseController()0%000100%
File 2: Start()0%000100%
File 2: Update()0%00037.5%
File 2: changeLights()0%00092.86%

File(s)

D:/--UnityProject/VR/_____ISSTA 26/Island-Visualizer-PCVR/Assets/Scripts/Test/HouseController.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class HouseController : MonoBehaviour
 4{
 5    public GameObject[] windowGlassObjects;
 6
 7    [ColorUsage(true, true)]
 8    public Color lightsOnEmissionColor;
 9
 10    [ColorUsage(true, true)]
 11    public Color lightsOffEmissionColor;
 12
 1413    public bool lightStatus = false;
 1414    private bool currentLightStatus = false;
 15    public AudioSource switchSound;
 16
 17    private void Start()
 618    {
 619        changeLights();
 620    }
 21
 22    private void Update()
 94223    {
 94224        if (currentLightStatus != lightStatus)
 025        {
 026            currentLightStatus = lightStatus;
 027            changeLights();
 028            switchSound.Play();
 029        }
 94230    }
 31
 32    public void changeLights()
 1133    {
 1134        Color colorChange = lightsOffEmissionColor;
 1135        if (currentLightStatus == true) colorChange = lightsOnEmissionColor;
 12136        foreach (GameObject targetObject in windowGlassObjects)
 4437        {
 4438            Material targetMaterial = targetObject.GetComponent<Renderer>().material;
 39            // Set the new HDR color to the material's emission color property
 4440            targetMaterial.SetColor("_EmissionColor", colorChange);
 41
 42            // Enable emission on the material (if it's not already enabled)
 4443            targetMaterial.EnableKeyword("_EMISSION");
 4444        }
 1145    }
 46}

E:/Unity/Unity Project/Island-Visualizer-PCVR/Assets/Scripts/Test/HouseController.cs

File 'E:/Unity/Unity Project/Island-Visualizer-PCVR/Assets/Scripts/Test/HouseController.cs' does not exist (any more).