< 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{
 367    bool isOpened = false;
 8    Animator Anim;
 9
 3610    bool isAnimating = false;
 11
 12    // Start is called before the first frame update
 13    void Start()
 1814    {
 1815        Anim = this.GetComponent<Animator>();
 1816    }
 17
 18    // Update is called once per frame
 19    void Update()
 348020    {
 21
 348022    }
 23
 24    private void OnTriggerEnter(Collider col)
 4525    {
 4526        if (!isOpened)
 1927        {
 1928            openDoors();
 29
 1930        }
 4531    }
 32
 33    void openDoors()
 1934    {
 1935        isOpened = true;
 1936        Anim.SetTrigger("DoorTrigger");
 1937    }
 38    void OnTriggerExit(Collider other)
 4239    {
 4240        if (isOpened)
 3941        {
 3942            Invoke("closeDoors", 0.5f);
 3943        }
 4244    }
 45
 46    void closeDoors()
 3947    {
 3948        isOpened = false;
 3949        Anim.SetTrigger("DoorTrigger");
 3950    }
 51
 52}