void Update() { if (!timerStartStoped) { timerStart += Time.deltaTime; if (timerStart % 60 >= 3) { timerStartStoped = true; timerReactionStoped = false; stopInput = false; SayNewName(); } } if (!timerReactionStoped) { if (Input.GetKeyDown(KeyCode.Space) && !stopInput) { ControlNameSaid(); } if (timerReaction % 60 >= reactionTime && !stopEndTime) { ControlEndTime(); } else { if (timerReaction % 60 >= answerTime + 2) { stopInput = false; timerReaction = 0; GUIControlObject.DisableStudentAnswerText(); SayNewName(); } } timerReaction += Time.deltaTime; } }