< Summary

Class:ExitDoor
Assembly:Assembly-CSharp
File(s):D:/--UnityProject/VR/_____ISSTA 26/Edutainment-Escape-Room/Assets/Scripts/Test2/ExitDoor.cs
Covered lines:7
Uncovered lines:12
Coverable lines:19
Total lines:37
Line coverage:36.8% (7 of 19)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:4
Method coverage:75% (3 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ExitDoor()0%000100%
Start()0%000100%
onFinish()0%0000%
OnTriggerEnter(...)0%00037.5%

File(s)

D:/--UnityProject/VR/_____ISSTA 26/Edutainment-Escape-Room/Assets/Scripts/Test2/ExitDoor.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class ExitDoor : MonoBehaviour
 7{
 28    bool isOpened = false;
 9    Animator Anim;
 10
 11    public Timer timer;
 12
 13    // Start is called before the first frame update
 14    void Start()
 115    {
 116        Anim = this.GetComponent<Animator>();
 117    }
 18
 19    public void onFinish()
 020    {
 021        if (!isOpened)
 022        {
 023            isOpened = true;
 024            Anim.SetTrigger("DoorTrigger");
 025        }
 026    }
 27
 28    private void OnTriggerEnter(Collider col)
 129    {
 130        if (isOpened)
 031        {
 032            isOpened = false;
 033            Anim.SetTrigger("DoorTrigger");
 034            timer.removeOutOfTime();
 035        }
 136    }
 37}