Beispiel #1
0
    // When the user was wrong
    public void IsWrong(string explanation)
    {
        if (_hasResult)
        {
            return;
        }

        // Tell the score that the user scored a wrong answer
        Scores.AddWrong();
        _hasResult = true;

        // Stop here when feedback is shown only after the scene
        if (modeFeedback is ModeFeedbackAfter)
        {
            return;
        }

        // If renderer found, set material to wrong
        if (box_renderer != null)
        {
            box_renderer.material = m_wrong;
        }

        // Disable correct feedback
        ui_correct.SetActive(false);

        // Enable wrong feedback
        ui_wrong.SetActive(true);
        txt_wrong.text = explanation;

        // Show feedback
        canvas_explanation.SetActive(true);

        time         = 0;
        isShowingMsg = true;
    }