< Summary

Class:FindEscape
Assembly:Test
File(s):E:/Unity/Unity Project/EscapeTheRoomVR/Assets/Test 1/FindEscape.cs
Covered lines:17
Uncovered lines:0
Coverable lines:17
Total lines:26
Line coverage:100% (17 of 17)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:1
Method coverage:100% (1 of 1)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Escape()0%000100%

File(s)

E:/Unity/Unity Project/EscapeTheRoomVR/Assets/Test 1/FindEscape.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class FindEscape : MonoBehaviour {
 6    // Play audio sequence and show congratulatory messsage for escaping room
 17    public void Escape() {
 18        DigitalClock clock = GameObject.FindGameObjectWithTag ("digitalLED").GetComponent<DigitalClock>();
 19        AudioSource breakEffect = GameObject.FindWithTag("mirror").GetComponent<AudioSource>();
 110        breakEffect.Play();
 111        GameObject.Destroy(GameObject.FindGameObjectWithTag ("reflectionProbe"));
 112        string form = (clock.score == 1) ? "minute" : "minutes";
 113        gameObject.GetComponent<Usable>().Inspect(
 14            string.Format("You've successfully escaped in {0} {1}!", clock.score, form)
 15        );
 116        GameObject.FindWithTag("mirror").GetComponent<Usable>().enabled = false;
 117        GameObject.FindWithTag("mirror").GetComponent<Collectable>().enabled = false;
 118        GameObject.FindWithTag("mirror").GetComponent<Collider>().enabled = false;
 119        AudioSource bgAudio = GameObject.Find("Background Music").GetComponent<AudioSource>();
 120        bgAudio.Stop();
 121        StopCoroutine("PlayTime");
 222        if (clock.pointFlicker && clock.secondsDCV == null) {
 123            StopCoroutine("PlayPointFlicker");
 124        }
 125    }
 26}

Methods/Properties

Escape()