Пример #1
0
    void OnEnable()
    {
        round++;
        Debug.LogError("QEUSTION-LOADER WAS STARTED!!!");
        GameObject myObj = GameObject.FindGameObjectWithTag("Question");

        if (myObj != null)
        {
            questionManager = myObj.GetComponent <Question>();
        }

        rightAnswerIndex = -1;
        answers          = new string[3];
        randoms          = new int[3];

        GetQuestionNr();
        FillWithRandomUniqueNumbers(randoms);
        answerButtons.Interactable(false);
        StartCoroutine(GetQuestionAndUpdateUi());
        progressBar.StartLoadingAnimation(gameManager.roundDuration);
        //execution of code after last line will continue immediately
    }