Exemplo n.º 1
0
    public void NextQuestion()
    {
        if (QuestionCount > 0)
        {
            TimerActive = true;
            PokemonQuestion question = questionGen.GetNextQuestion();
            QuestionCount--;

            switch (question.QuestionType)
            {
            case QuestionType.Name:
            case QuestionType.FlavorText:
                FillInTheBlankQuestion.GetComponent <FillTextController>().SetQuestion(question);
                SetActiveQuestionGroup(QuestionGroup.FillInBlank);
                break;

            case QuestionType.PokedexNumber:
                PokedexNumberQuestion.GetComponent <PNQController>().SetQuestion(question);
                SetActiveQuestionGroup(QuestionGroup.PokedexNum);
                break;


            case QuestionType.EggGroup:
            case QuestionType.Generation:
                MCQQuestion.GetComponent <MCQController>().SetQuestion(question);
                SetActiveQuestionGroup(QuestionGroup.MCQ);
                break;
            }
        }
        else
        {
            EndGame();
        }
    }
Exemplo n.º 2
0
    public PokemonQuestion GetNextQuestion()
    {
        PokemonQuestion question = Questions.Dequeue();

        Questions.Enqueue(question);
        return(question);
    }
Exemplo n.º 3
0
 public void SetQuestion(PokemonQuestion question)
 {
     Question = question;
     for (int i = 0; i < question.Choices.Count; i++)
     {
         Buttons[i].GetComponentInChildren <TMP_Text>().text = question.Choices[i];
     }
     QuestionText.text = Question.Question;
 }
 public void SetQuestion(PokemonQuestion question)
 {
     PokeQuestion      = question;
     QuestionText.text = PokeQuestion.Question;
 }