michal

mail@pastecode.io avatar
unknown
csharp
7 months ago
851 B
1
Indexable
Never
void SetQuestionAndAnswer()
{
    // ... (previous question cases)

    if (questionNumber == 23)
    {
        QuestionDisplay.newQuestion = "ďakujem za vyplnenie quizu";
        QuestionDisplay.newA = "";
        QuestionDisplay.newB = "";
        QuestionDisplay.newC = "";
        QuestionDisplay.newD = "";
        actualAnswer = "E";

        // Show the exit button by activating its GameObject
        ExitButtonGameObject.SetActive(true);

        // Deactivate the answer buttons
        ButtonA.SetActive(false);
        ButtonB.SetActive(false);
        ButtonC.SetActive(false);
        ButtonD.SetActive(false);
    }
    else
    {
        // Set other questions and answers here

        // Ensure the exit button is deactivated for other questions
        ExitButtonGameObject.SetActive(false);
    }
}