< Summary

Class:room3
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/escapeVr/Assets/Script/room3.cs
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:32
Line coverage:100% (19 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%000100%
DesactivateLaser()0%000100%
Update()0%000100%

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{
 67    private bool laser1 = false;
 68    private bool laser2 = false;
 69    private bool doorOpen = false;
 610    [SerializeField] private Animator doorAnim = null;
 11    [SerializeField] private AudioSource winton;
 12
 413    public void SetLaser() {
 1014        if (laser1 == false) { laser1 = true; }
 615        else { laser2 = true; }
 416    }
 17
 18    public void DesactivateLaser()
 219    {
 520        if (laser1 == true) { laser1 = false; }
 221    }
 22
 23    private void Update()
 178324    {
 178325        if (laser1 && laser2 && !doorOpen)
 126        {
 127            doorOpen = true;
 128            doorAnim.Play("DoorOpen", 0, 0.0f);
 129            winton.Play();
 130        }
 178331    }
 32}