< Summary

Class:TimeManager
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/VGuns-Unity-VR/Assets/Test/Time/TimeManager.cs
Covered lines:7
Uncovered lines:8
Coverable lines:15
Total lines:29
Line coverage:46.6% (7 of 15)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:4
Method coverage:50% (2 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TimeManager()0%000100%
Update()0%000100%
DoSlowmotion()0%0000%
DoSpeedUp()0%0000%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/VGuns-Unity-VR/Assets/Test/Time/TimeManager.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class TimeManager : MonoBehaviour {
 4
 25    public float slowdownFactor = 0.05f;
 26    public float TimeLength = 2f;
 7
 28    public float SpeedupFactor = 0.05f;
 9
 10    void Update ()
 359911    {
 359912        Time.timeScale += (1f / TimeLength) * Time.unscaledDeltaTime;
 359913        Time.timeScale = Mathf.Clamp(Time.timeScale, 0f, 1f);
 359914    }
 15
 16    public void DoSlowmotion ()
 017    {
 018        Time.timeScale = slowdownFactor;
 019        Time.fixedDeltaTime = Time.timeScale * .02f;
 020    }
 21
 22    public void DoSpeedUp ()
 023    {
 024        Time.timeScale = SpeedupFactor;
 025        Time.fixedDeltaTime = Time.timeScale - .02f;
 026    }
 27
 28}
 29