示例#1
0
    IEnumerator WrongEvent(float time, GameObject image)
    {
        StartCoroutine(answerDisplay(1, wrongImage));
        WrongAudio.Play();
        freezeInput();
        resultField.text = resultField.text + "=> " + resExpected;
        yield return(new WaitForSeconds(1.5f));

        resultField.text = "";
        if (gamemode == "calcul")
        {
            calculScript.randomCalcul();
            currentCalcul.text = calculScript.calculQuestion;
        }
        else if (gamemode == "table")
        {
            calculTableScript.randomCalcul();
            currentCalcul.text = calculTableScript.calculQuestion;
        }
        resultField.text = "";
        enableInput();
        scoreUpdate.wrongAnswer();
        nbWrong         += 1;
        nbWrongText.text = nbWrong.ToString();
        displayingResult = false;
    }