< 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{
 487    bool isOpened = false;
 8    Animator Anim;
 9
 4810    bool isAnimating = false;
 11
 12    // Start is called before the first frame update
 13    void Start()
 4214    {
 4215        Anim = this.GetComponent<Animator>();
 4216    }
 17
 18    // Update is called once per frame
 19    void Update()
 15841220    {
 21
 15841222    }
 23
 24    private void OnTriggerEnter(Collider col)
 30225    {
 30226        if (!isOpened)
 14627        {
 14628            openDoors();
 29
 14630        }
 30231    }
 32
 33    void openDoors()
 14634    {
 14635        isOpened = true;
 14636        Anim.SetTrigger("DoorTrigger");
 14637    }
 38    void OnTriggerExit(Collider other)
 29639    {
 29640        if (isOpened)
 25041        {
 25042            Invoke("closeDoors", 0.5f);
 25043        }
 29644    }
 45
 46    void closeDoors()
 25047    {
 25048        isOpened = false;
 25049        Anim.SetTrigger("DoorTrigger");
 25050    }
 51
 52}