예제 #1
0
    void Proceed(int buttonId)
    {
        CheckAnswerValue(first, second);
        if (currentQuestion % 3 == 0)
        {
            Invoke("DoEndingSpeech", 5);
        }
        else
        {
            handler.GetQuestionType(selectedQuestion);
            if (selectedQuestion != questionObjects[questionObjects.Count - 1])
            {
                for (int i = 0; i < questionObjects.Count; i++)
                {
                    if (questionObjects[i] == selectedQuestion)
                    {
                        selectedQuestion = questionObjects[i + 1];
                        break;
                    }
                }
            }

            nextQuestion.gameObject.SetActive(true);
            currentQuestion++;
        }
    }