< Summary

Class:finalPuzzle
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Final Puzzle Room/finalPuzzle.cs
Covered lines:19
Uncovered lines:21
Coverable lines:40
Total lines:75
Line coverage:47.5% (19 of 40)
Covered branches:0
Total branches:0
Covered methods:5
Total methods:7
Method coverage:71.4% (5 of 7)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
finalPuzzle()0%000100%
Start()0%000100%
Update()0%00025%
decrementFirstPart()0%000100%
incrementFirstPart()0%000100%
incrementSecondPart()0%0000%
decrementSecondPart()0%0000%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Final Puzzle Room/finalPuzzle.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class finalPuzzle : MonoBehaviour
 7{
 8    // Start is called before the first frame update
 49    private bool firstPartDone = false;
 10
 411    private int firstPart = 0;
 412    private int secondPart = 0;
 13
 14    public GameObject firstPartText;
 15    public GameObject secondPartText;
 16    public GameObject code;
 17
 18    public GameObject pictures;
 19
 20    public GameObject blocks1;
 21    public GameObject blocks2;
 22    public GameObject blocks3;
 23
 24    //legg inn final puzzle teksten;
 25
 26    void Start()
 227    {
 228        blocks1.SetActive(false);
 229        blocks2.SetActive(false);
 230        blocks3.SetActive(false);
 231    }
 32
 33    private void Update()
 491034    {
 491035        if (firstPart <= 0)
 036        {
 037            firstPartDone = true;
 038        }
 491039        if (firstPartDone)
 040        {
 041            firstPartText.SetActive(false);
 042            pictures.SetActive(false);
 43
 044            secondPartText.SetActive(true);
 045            blocks1.SetActive(true);
 046            blocks2.SetActive(true);
 047            blocks3.SetActive(true);
 048        }
 491049        if (secondPart >= 3)
 050        {
 051            secondPartText.SetActive(false);
 052            code.SetActive(true);
 053        }
 491054    }
 55
 56    internal void decrementFirstPart()
 357    {
 358        firstPart--;
 359    }
 60
 61    internal void incrementFirstPart()
 662    {
 663        firstPart++;
 664    }
 65
 66    internal void incrementSecondPart()
 067    {
 068        secondPart++;
 069    }
 70
 71    internal void decrementSecondPart()
 072    {
 073        secondPart--;
 074    }
 75}