Exemplo n.º 1
0
 public void askAQuestion()
 {
     if (questions.Length > 0)
     {
         indxQuestion = Random.Range(0, questions.Length - 1);
         TutorialStaticVariables.setEverything(questions[indxQuestion]);
     }
 }
Exemplo n.º 2
0
    public void OnPointerClick(PointerEventData eventData)
    {
        canvasTutorial.gameObject.SetActive(false);

        TutorialStaticVariables.clear();

        exerTutorial.askAQuestion();
        exerTutorial.gameObject.SetActive(true);
    }
Exemplo n.º 3
0
    public void OnPointerClick(PointerEventData eventData)
    {
        if (canvas.answerQuestion(text.text))
        {
            anim.SetBool("correct", true);
            anim.SetBool("answered", true);

            TutorialStaticVariables.incrementQuestionsAnswered();


            GameObject.Find("CorrectSoundEffect").GetComponent <AudioSource>().Play();
            //GameObject.Find("CorrectSoundEffect").GetComponent<AudioSource>().Play();

            prepareNextQuestion();
        }
        else
        {
            GameObject.Find("WrongSoundEffect").GetComponent <AudioSource>().Play();
            anim.SetBool("correct", false);
            anim.SetBool("answered", true);
        }
    }
Exemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     text.text = TutorialStaticVariables.getQuestionText();
 }
Exemplo n.º 5
0
 // Update is called once per frame
 void Update()
 {
     text.text = TutorialStaticVariables.getChoice(choiceType);
 }