< 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:27
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{
 648    [SerializeField] private Animator myDoor = null;
 649    [SerializeField] private bool openTrigger = false;
 10
 11    private SnapToTrigger snap;
 12
 13    private void OnTriggerEnter(Collider other)
 2014    {
 2015        snap = other.GetComponent<SnapToTrigger>();
 2016        if (other.CompareTag("Objet1"))
 217        {
 218            if (openTrigger)
 219            {
 220                snap.Snap(gameObject.transform.position);
 221                myDoor.Play("DoorOpen",0,0.0f);
 222                gameObject.SetActive(false);
 223                openTrigger = false;
 224            }
 225        }
 2026    }
 27}