void Update() { if (updateOn) { if (!isGameEnd) { TimerUpdate(); } else { time_in_stringformat = time_Text.text; data = new ResultData(correct_guesses, wrong_guesses, time_in_stringformat, score_deducted, score_bonus_time, score_bonus_guesses, time, score); audioControll.playSoundYay(); JPResult result = ResultPanel.GetComponent <JPResult> (); updateOn = false; Delay(1.0f); StartCoroutine(trial(result)); } } }
IEnumerator trial(JPResult result) { yield return(new WaitForSeconds(0.3f)); result.showResultPage(); }