< 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
 89    private bool firstPartDone = false;
 10
 811    private int firstPart = 0;
 812    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()
 727    {
 728        blocks1.SetActive(false);
 729        blocks2.SetActive(false);
 730        blocks3.SetActive(false);
 731    }
 32
 33    private void Update()
 2640234    {
 2640235        if (firstPart <= 0)
 036        {
 037            firstPartDone = true;
 038        }
 2640239        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        }
 2640249        if (secondPart >= 3)
 050        {
 051            secondPartText.SetActive(false);
 052            code.SetActive(true);
 053        }
 2640254    }
 55
 56    internal void decrementFirstPart()
 1257    {
 1258        firstPart--;
 1259    }
 60
 61    internal void incrementFirstPart()
 3362    {
 3363        firstPart++;
 3364    }
 65
 66    internal void incrementSecondPart()
 067    {
 068        secondPart++;
 069    }
 70
 71    internal void decrementSecondPart()
 072    {
 073        secondPart--;
 074    }
 75}