public void EndGame(endState result) { if (result == endState.win) { SceneManager.LoadScene("Win"); } else { if (result == endState.lossTime) { SceneManager.LoadScene("LossTime"); } else { SceneManager.LoadScene("LossCrash"); } } }
return WaitUntil(maxWaitSeconds, secondsPerIter, endState, isState, doFailure, attemptCount);