< 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{
 167    private bool laser1 = false;
 168    private bool laser2 = false;
 169    private bool doorOpen = false;
 1610    [SerializeField] private Animator doorAnim = null;
 11    [SerializeField] private AudioSource winton;
 12
 3613    public void SetLaser() {
 12014        if (laser1 == false) { laser1 = true; }
 2415        else { laser2 = true; }
 3616    }
 17
 18    public void DesactivateLaser()
 3019    {
 10820        if (laser1 == true) { laser1 = false; }
 3021    }
 22
 23    private void Update()
 503224    {
 503225        if (laser1 && laser2 && !doorOpen)
 226        {
 227            doorOpen = true;
 228            doorAnim.Play("DoorOpen", 0, 0.0f);
 229            winton.Play();
 230        }
 503231    }
 32}