< 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{
 258    public float peso=0.7f;
 259    public int pesoEnKgs=7;
 2510    private bool hasPlayed = false;
 11
 12    public TextMeshProUGUI textoPeso;
 13
 14    private void Start()
 715    {
 716       changePeso();
 717    }
 18
 19    public void changePeso()
 720    {
 721        this.GetComponent<Rigidbody>().mass = peso;
 722        textoPeso.text = pesoEnKgs.ToString() + "KG";
 723    }
 24
 25    private void OnCollisionEnter(Collision collision)
 926    {
 927        if (collision.gameObject.CompareTag("Bolo") && hasPlayed==false)
 028        {
 029            hasPlayed = true;
 030            gameObject.GetComponent<AudioSource>().Play();
 031        }
 932    }
 33}