michal

 avatar
unknown
csharp
2 years ago
851 B
4
Indexable
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);
    }
}
Editor is loading...