< Summary

Class:BallSoundController
Assembly:Assembly-CSharp
File(s):D:/--UnityProject/VR/_____ISSTA 26/BowlingVR/Assets/Script/Test/BallSoundController.cs
Covered lines:13
Uncovered lines:4
Coverable lines:17
Total lines:33
Line coverage:76.4% (13 of 17)
Covered branches:0
Total branches:0
Covered methods:4
Total methods:4
Method coverage:100% (4 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
BallSoundController()0%000100%
Start()0%000100%
changePeso()0%000100%
OnCollisionEnter(...)0%00042.86%

File(s)

D:/--UnityProject/VR/_____ISSTA 26/BowlingVR/Assets/Script/Test/BallSoundController.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using TMPro;
 4using UnityEngine;
 5
 6public class BallSoundController : MonoBehaviour
 7{
 328    public float peso=0.7f;
 329    public int pesoEnKgs=7;
 3210    private bool hasPlayed = false;
 11
 12    public TextMeshProUGUI textoPeso;
 13
 14    private void Start()
 1415    {
 1416       changePeso();
 1417    }
 18
 19    public void changePeso()
 1420    {
 1421        this.GetComponent<Rigidbody>().mass = peso;
 1422        textoPeso.text = pesoEnKgs.ToString() + "KG";
 1423    }
 24
 25    private void OnCollisionEnter(Collision collision)
 1826    {
 1827        if (collision.gameObject.CompareTag("Bolo") && hasPlayed==false)
 028        {
 029            hasPlayed = true;
 030            gameObject.GetComponent<AudioSource>().Play();
 031        }
 1832    }
 33}