< Summary

Class:TimeManager
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/VGuns-Unity-VR/Assets/Test/Time/TimeManager.cs
Covered lines:15
Uncovered lines:0
Coverable lines:15
Total lines:29
Line coverage:100% (15 of 15)
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
TimeManager()0%000100%
Update()0%000100%
DoSlowmotion()0%000100%
DoSpeedUp()0%000100%

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
 55    public float slowdownFactor = 0.05f;
 56    public float TimeLength = 2f;
 7
 58    public float SpeedupFactor = 0.05f;
 9
 10    void Update ()
 1234111    {
 1234112        Time.timeScale += (1f / TimeLength) * Time.unscaledDeltaTime;
 1234113        Time.timeScale = Mathf.Clamp(Time.timeScale, 0f, 1f);
 1234114    }
 15
 16    public void DoSlowmotion ()
 317    {
 318        Time.timeScale = slowdownFactor;
 319        Time.fixedDeltaTime = Time.timeScale * .02f;
 320    }
 21
 22    public void DoSpeedUp ()
 323    {
 324        Time.timeScale = SpeedupFactor;
 325        Time.fixedDeltaTime = Time.timeScale - .02f;
 326    }
 27
 28}
 29