My timer is rounded to one decimal. In my update function I check if the timer is 0.8, but when it is 0.8 it does not return anything. However the debug log tells me that it has past 0.8.
void Update()
{
Debug.Log ("Elapsed time: " + (Mathf.Round(timerScript.elapsedTime * 10f) / 10f));
if (((Mathf.Round(timerScript.elapsedTime * 10f) / 10f) == 0.8f)) {
{
Debug.Log ("CHECK");
}
}
Is the if statement too slow? How do I fix this?