public void askAQuestion() { if (questions.Length > 0) { indxQuestion = Random.Range(0, questions.Length - 1); TutorialStaticVariables.setEverything(questions[indxQuestion]); } }
public void OnPointerClick(PointerEventData eventData) { canvasTutorial.gameObject.SetActive(false); TutorialStaticVariables.clear(); exerTutorial.askAQuestion(); exerTutorial.gameObject.SetActive(true); }
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); } }
// Update is called once per frame void Update() { text.text = TutorialStaticVariables.getQuestionText(); }
// Update is called once per frame void Update() { text.text = TutorialStaticVariables.getChoice(choiceType); }