void HandleInputLogic() { #region Pre-trial if (!started) { if (CheckInput()) { Instructions.gameObject.SetActive(false); started = true; timer.Start(); } } #endregion #region Running Trial //If we're running trials if (started && trialIndex < numTrials) { //If we got input if (CheckInput()) { //If we're getting input if (receivingInput) { //Set the score and reaction counter score[trialIndex] += Time.timeSinceLevelLoad - gettingInputStart; reactionTime[trialIndex] = Time.timeSinceLevelLoad - gettingInputStart; //We don't want to ask for input PromptInput.gameObject.SetActive(false); //We haven't given a blink yet presentedBlinkYet = false; //Reset the clock timer.Reset(true); //Next trial trialIndex++; if (trialIndex >= numTrials) { OutputScores(); running = false; } } else { //Punish the user for early input score[trialIndex] += .25f; //Set the timer back so they don't miss the actual input. timer.AdjustTime(-.35f); } } } #endregion }