< Summary

Class:ExitDoor
Assembly:Assembly-CSharp
File(s):D:/--UnityProject/VR/_____ISSTA 26/Edutainment-Escape-Room/Assets/Scripts/Test2/ExitDoor.cs
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:37
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
ExitDoor()0%000100%
Start()0%000100%
onFinish()0%000100%
OnTriggerEnter(...)0%000100%

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()
 120    {
 121        if (!isOpened)
 122        {
 123            isOpened = true;
 124            Anim.SetTrigger("DoorTrigger");
 125        }
 126    }
 27
 28    private void OnTriggerEnter(Collider col)
 1229    {
 1230        if (isOpened)
 131        {
 132            isOpened = false;
 133            Anim.SetTrigger("DoorTrigger");
 134            timer.removeOutOfTime();
 135        }
 1236    }
 37}