< Summary

Class:DoorAnimationEvent
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/DoorAnimationEvent.cs
Covered lines:27
Uncovered lines:0
Coverable lines:27
Total lines:52
Line coverage:100% (27 of 27)
Covered branches:0
Total branches:0
Covered methods:7
Total methods:7
Method coverage:100% (7 of 7)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DoorAnimationEvent()0%000100%
Start()0%000100%
Update()0%000100%
OnTriggerEnter(...)0%000100%
openDoors()0%000100%
OnTriggerExit(...)0%000100%
closeDoors()0%000100%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/DoorAnimationEvent.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class DoorAnimationEvent : MonoBehaviour
 6{
 247    bool isOpened = false;
 8    Animator Anim;
 9
 2410    bool isAnimating = false;
 11
 12    // Start is called before the first frame update
 13    void Start()
 1214    {
 1215        Anim = this.GetComponent<Animator>();
 1216    }
 17
 18    // Update is called once per frame
 19    void Update()
 2946020    {
 21
 2946022    }
 23
 24    private void OnTriggerEnter(Collider col)
 33925    {
 33926        if (!isOpened)
 16227        {
 16228            openDoors();
 29
 16230        }
 33931    }
 32
 33    void openDoors()
 16234    {
 16235        isOpened = true;
 16236        Anim.SetTrigger("DoorTrigger");
 16237    }
 38    void OnTriggerExit(Collider other)
 33339    {
 33340        if (isOpened)
 31341        {
 31342            Invoke("closeDoors", 0.5f);
 31343        }
 33344    }
 45
 46    void closeDoors()
 31347    {
 31348        isOpened = false;
 31349        Anim.SetTrigger("DoorTrigger");
 31350    }
 51
 52}