// called when a list is completed. public void OnCompleteList() { if (logMetrics) { logger.AddMetricToLogger("STEP" + (currentStep), timer.GetCurrentStopwatchTime()); } }
// Update is called once per frame void Update() { // if the text object has been set. if (text != null) { // sets the countdown start time if it has been changed. if (countdownStart != timer1.GetCountdownStartTime()) { timer1.SetCountdownStartTime(countdownStart); } // the number of the timer that should be used. // now formatted with ToString("F2"). switch (timerNumber) { case 1: // countdown if (overrideTimerPause) { timer1.paused = paused; } text.text = "Timer: " + timer1.GetCurrentCountdownTime().ToString("F2"); break; case 2: // stopwatch if (overrideTimerPause) { timer2.paused = paused; } text.text = "Timer: " + timer2.GetCurrentStopwatchTime().ToString("F2"); break; default: break; } } }