/// <summary> /// Função que mostra a última pergunta sorteada na tela /// </summary> public void ShowNewQuestion() { /// Pega a pergunta que deve ser exibida da lista de perguntas selectedQuestion = questionGroup[dificulty].GetQuestion(questionAndAnswer[index].GetQuestionNumber()); /// Mostra a pergunta questionMeshText.text = selectedQuestion.GetQuestion().text; questionMeshText.GetComponentInParent <PlayVideoOnMouseOver>().video = selectedQuestion.GetQuestion().video; /// Mostra todas as alternativas for (int i = 0; i < numberOfAnswers; i++) { answerMeshText[i].text = selectedQuestion.GetAlternative(i).text; answerMeshText[i].GetComponentInParent <PlayVideoOnMouseOver>().video = selectedQuestion.GetAlternative(i).video; } UnblockButtons(); StartCoroutine(VideoManager.instance.PlayVideo(selectedQuestion.GetQuestion().video)); timeManager.StartTimer(); }
/// <summary> /// Função que mostra a última pergunta sorteada na tela /// </summary> public void ShowNewQuestion() { /// Pega a pergunta que deve ser exibida da lista de perguntas selectedQuestion = questionGroup[dificulty].GetQuestion(questionAndAnswer[index].GetQuestionNumber()); /// Mostra a pergunta questionMeshText.text = selectedQuestion.GetQuestion(); /// Mostra todas as alternativas for (int i = 0; i < numberOfAnswers; i++) { answerMeshText[i].text = selectedQuestion.GetAlternative(i); } UnblockButtons(); timeManager.StartTimer(); }