< Summary

Class:DoorOpenScript
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/escapeVr/Assets/Script/DoorOpenScript.cs
Covered lines:15
Uncovered lines:0
Coverable lines:15
Total lines:29
Line coverage:100% (15 of 15)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DoorOpenScript()0%000100%
OnTriggerEnter(...)0%000100%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/escapeVr/Assets/Script/DoorOpenScript.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class DoorOpenScript : MonoBehaviour
 7{
 248    [SerializeField] private Animator myDoor = null;
 249    [SerializeField] private bool openTrigger = false;
 10
 11    private SnapToTrigger snap;
 12
 13    private void OnTriggerEnter(Collider other)
 814    {
 15
 816        snap = other.GetComponent<SnapToTrigger>();
 817        if(other.CompareTag("Objet1"))
 118        {
 119            if(openTrigger)
 120            {
 121                snap.Snap(gameObject.transform.position);
 122                myDoor.Play("DoorOpen", 0, 0.0f);
 123                gameObject.SetActive(false);
 124                openTrigger = false;
 125            }
 126        }
 827    }
 28}
 29