< Summary

Class:DigicodeAreaController
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/EscapeGameVR/Assets/Scripts/Test/Digicode/DigicodeAreaController.cs
Covered lines:9
Uncovered lines:6
Coverable lines:15
Total lines:40
Line coverage:60% (9 of 15)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:3
Method coverage:100% (3 of 3)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%000100%
OnTriggerEnter(...)0%00050%
OnTriggerExit(...)0%00050%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/EscapeGameVR/Assets/Scripts/Test/Digicode/DigicodeAreaController.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class DigicodeAreaController : MonoBehaviour
 6{
 7
 8    [SerializeField] GameObject rightTeleportationRay;
 9    [SerializeField] GameObject leftTeleportationRay;
 10    [SerializeField] GameObject rightRayInteractor;
 11    [SerializeField] GameObject leftRayInteractor;
 12
 13    public static bool isInDigicodeArea = false;
 14
 15    // Start is called before the first frame update
 16    void Start()
 617    {
 618        isInDigicodeArea = false;
 619    }
 20
 21    private void OnTriggerEnter(Collider other)
 2422    {
 2423        if (!isInDigicodeArea && other.gameObject.layer == LayerMask.NameToLayer("Player"))
 024        {
 25            //Debug.Log("Collision Head");
 026            isInDigicodeArea = true;
 027        }
 28
 2429    }
 30
 31    private void OnTriggerExit(Collider other)
 2432    {
 2433        if (isInDigicodeArea && other.gameObject.layer == LayerMask.NameToLayer("Player"))
 034        {
 035            isInDigicodeArea = false;
 36
 037        }
 2438    }
 39
 40}