Exemple #1
0
    private IEnumerator Routine(OptionSelect_2 optionBtn)
    {
        if (audioSource.isPlaying)
        {
            audioSource.Stop();
        }
        audioSource.clip = optionBtn.option.correct ? correctSound : incorrectSound;
        optionBtn.SetColor(optionBtn.option.correct ? correctColor : incorrectColor);
        audioSource.Play();
        yield return(new WaitForSeconds(waitTime));

        NextQuestion();
    }
Exemple #2
0
 private void GiveAnswer(OptionSelect_2 optionBtn)
 {
     StartCoroutine(Routine(optionBtn));
 }