< Summary

Class:room3
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/escapeVr/Assets/Script/room3.cs
Covered lines:13
Uncovered lines:6
Coverable lines:19
Total lines:32
Line coverage:68.4% (13 of 19)
Covered branches:0
Total branches:0
Covered methods:4
Total methods:4
Method coverage:100% (4 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
room3()0%000100%
SetLaser()0%00066.67%
DesactivateLaser()0%000100%
Update()0%00037.5%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/escapeVr/Assets/Script/room3.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class room3 : MonoBehaviour
 6{
 27    private bool laser1 = false;
 28    private bool laser2 = false;
 29    private bool doorOpen = false;
 210    [SerializeField] private Animator doorAnim = null;
 11    [SerializeField] private AudioSource winton;
 12
 113    public void SetLaser() {
 414        if (laser1 == false) { laser1 = true; }
 015        else { laser2 = true; }
 116    }
 17
 18    public void DesactivateLaser()
 119    {
 420        if (laser1 == true) { laser1 = false; }
 121    }
 22
 23    private void Update()
 150624    {
 150625        if (laser1 && laser2 && !doorOpen)
 026        {
 027            doorOpen = true;
 028            doorAnim.Play("DoorOpen", 0, 0.0f);
 029            winton.Play();
 030        }
 150631    }
 32}