< Summary

Class:Scoremanager
Assembly:Assembly-CSharp
File(s):D:/--UnityProject/VR/_____ISSTA 26/wheelchair-sim/Assets/Scripts/Test/Scoremanager.cs
Covered lines:10
Uncovered lines:8
Coverable lines:18
Total lines:43
Line coverage:55.5% (10 of 18)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:3
Method coverage:66.6% (2 of 3)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%000100%
changescore(...)0%0000%
Update()0%000100%

File(s)

D:/--UnityProject/VR/_____ISSTA 26/wheelchair-sim/Assets/Scripts/Test/Scoremanager.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4using TMPro;
 5
 6public class Scoremanager : MonoBehaviour
 7{
 8    public static Scoremanager instance;
 9    public TextMeshProUGUI ScoreText;
 10    public TextMeshProUGUI AmountUI;
 11    public int StarValue;
 12    public int winAmount;
 13    public WinLose winlosescript;
 14    public TextMeshProUGUI Timer;
 15    int score;
 16    // Start is called before the first frame update
 17    void Start()
 1418    {
 19        //winAmount.winAmount = "Stars to collect: " + AmountUI;
 20
 1421        AmountUI.text = "Star Amount: " + winAmount.ToString();
 1422        if (instance == null)
 1423        {
 1424            instance = this;
 1425        }
 26
 1427    }
 28    public void changescore(int StarValue)
 029    {
 030        score += StarValue;
 031        ScoreText.text = "Stars: " + score.ToString();
 032        if (score == winAmount)
 033        {
 034            winlosescript.Winlevel();
 035        }
 036    }
 37    private void Update()
 102938    {
 102939        Timer.text = Time.time.ToString("0.0");
 102940    }
 41
 42
 43}