< 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{
 127    bool isOpened = false;
 8    Animator Anim;
 9
 1210    bool isAnimating = false;
 11
 12    // Start is called before the first frame update
 13    void Start()
 614    {
 615        Anim = this.GetComponent<Animator>();
 616    }
 17
 18    // Update is called once per frame
 19    void Update()
 778220    {
 21
 778222    }
 23
 24    private void OnTriggerEnter(Collider col)
 1625    {
 1626        if (!isOpened)
 1227        {
 1228            openDoors();
 29
 1230        }
 1631    }
 32
 33    void openDoors()
 1234    {
 1235        isOpened = true;
 1236        Anim.SetTrigger("DoorTrigger");
 1237    }
 38    void OnTriggerExit(Collider other)
 1639    {
 1640        if (isOpened)
 1641        {
 1642            Invoke("closeDoors", 0.5f);
 1643        }
 1644    }
 45
 46    void closeDoors()
 1647    {
 1648        isOpened = false;
 1649        Anim.SetTrigger("DoorTrigger");
 1650    }
 51
 52}