< Summary

Class:ExitDoor
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/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/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/ExitDoor.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class ExitDoor : MonoBehaviour
 7{
 48    bool isOpened = false;
 9    Animator Anim;
 10
 11    public Timer timer;
 12
 13    // Start is called before the first frame update
 14    void Start()
 215    {
 216        Anim = this.GetComponent<Animator>();
 217    }
 18
 19    public void onFinish()
 1020    {
 1021        if (!isOpened)
 222        {
 223            isOpened = true;
 224            Anim.SetTrigger("DoorTrigger");
 225        }
 1026    }
 27
 28    private void OnTriggerEnter(Collider col)
 1329    {
 1330        if (isOpened)
 131        {
 132            isOpened = false;
 133            Anim.SetTrigger("DoorTrigger");
 134            timer.removeOutOfTime();
 135        }
 1336    }
 37}