Exemple #1
0
    public void Answer4()
    {
        if (questionNumber != 0)
        {
            timeRemaining = 1;

            timerReady = true;

            if (AnimalFoodQuestionBank.questions[questionNumber - 1].answer == answerText4.text)
            {
                correctAnswer = true;
                MarkAsKnown();
            }

            // list
            else if (AnimalFoodQuestionBank.questions[questionNumber - 1].answerList.Contains(answerText4.text))
            {
                correctAnswer = true;
                MarkAsKnown();
            }

            else
            {
                correctAnswer = false;
                SimpleSoundManager.playIncorrectSound();
            }

            AnimalFoodQuestionBank.questions[questionNumber - 1].answered = true;
        }
    }
Exemple #2
0
    public void Answer2()
    {
        if (questionNumber != 0)
        {
            if (AnimalNamesQuestionBank.questions[questionNumber - 1].questionName == answerText2.text)
            {
                correctAnswer = true;
                MarkAsKnown();
                SimpleSoundManager.playCorrectSound();
            }
            else
            {
                correctAnswer = false;
                SimpleSoundManager.playIncorrectSound();
            }

            timeRemaining = 1;
            timerReady    = true;
        }
    }
    public void Answer1()
    {
        if (finished)
        {
            SceneManager.LoadScene("Scene002");
        }

        else if (questionNumber == 0)
        {
            questionImage.sprite = AnimalNamesQuestionBank.questions[0].sprite;
            answerText1.text     = AnimalNamesQuestionBank.questions[0].answerOptions[0];
            answerText2.text     = AnimalNamesQuestionBank.questions[0].answerOptions[1];
            answerText3.text     = AnimalNamesQuestionBank.questions[0].answerOptions[2];
            answerText4.text     = AnimalNamesQuestionBank.questions[0].answerOptions[3];

            fairyTalk.text = null;
            questionNumber++;
        }
        else
        {
            timeRemaining = 1;

            timerReady = true;

            if (AnimalNamesQuestionBank.questions[questionNumber - 1].questionName == answerText1.text)
            {
                correctAnswer = true;
                MarkAsKnown();
            }
            else
            {
                correctAnswer = false;
                SimpleSoundManager.playIncorrectSound();
            }

            AnimalNamesQuestionBank.questions[questionNumber - 1].answered = true;
        }
    }
Exemple #4
0
    public void Answer1()
    {
        if (finished)
        {
            //  SceneManager.LoadScene("Scene002");
        }

        else if (questionNumber == 0)
        {
            answerImage1.type = Image.Type.Simple;
            answerImage2.type = Image.Type.Simple;
            answerImage3.type = Image.Type.Simple;
            answerImage4.type = Image.Type.Simple;

            answerImage1.color = Color.white;
            answerImage2.color = Color.white;
            answerImage3.color = Color.white;
            answerImage4.color = Color.white;

            fairyTalk.fontSize = 76;

            answerText1.color = transparentTextColor;
            fairyTalk.text    = AnimalFoodQuestionBank.questions[0].fairyTalk;

            answerImage1.sprite = AnimalFoodQuestionBank.questions[0].answerOptionsSprites[0];
            answerText1.text    = AnimalFoodQuestionBank.questions[0].answerOptions[0];
            answerImage2.sprite = AnimalFoodQuestionBank.questions[0].answerOptionsSprites[1];
            answerText2.text    = AnimalFoodQuestionBank.questions[0].answerOptions[1];
            answerImage3.sprite = AnimalFoodQuestionBank.questions[0].answerOptionsSprites[2];
            answerText3.text    = AnimalFoodQuestionBank.questions[0].answerOptions[2];
            answerImage4.sprite = AnimalFoodQuestionBank.questions[0].answerOptionsSprites[3];
            answerText4.text    = AnimalFoodQuestionBank.questions[0].answerOptions[3];

            questionNumber++;
            GameControl.scene2Started = true;
        }
        else
        {
            timeRemaining = 1;

            timerReady = true;

            if (AnimalFoodQuestionBank.questions[questionNumber - 1].answer == answerText1.text)
            {
                correctAnswer = true;
                MarkAsKnown();
            }

            // list
            else if (AnimalFoodQuestionBank.questions[questionNumber - 1].answerList.Contains(answerText1.text))
            {
                correctAnswer = true;
                MarkAsKnown();
            }

            else
            {
                correctAnswer = false;
                SimpleSoundManager.playIncorrectSound();
            }

            AnimalFoodQuestionBank.questions[questionNumber - 1].answered = true;
        }
    }