void ShowQuizQuestion() { currentQuiz = storage.GetNextQuiz(); // set answers _firstButton.GetComponent <Image>().sprite = currentQuiz.choices[0].buttonImage; _secondButton.GetComponent <Image>().sprite = currentQuiz.choices[1].buttonImage; _thirdButton.GetComponent <Image>().sprite = currentQuiz.choices[2].buttonImage; musicPlayer.clip = currentQuiz.question.voice; musicPlayer.Play(); }
public TantanganQuiz GetNextQuiz() { TantanganQuiz result = quiz[currentQuiz]; if (currentQuiz + 1 > quiz.Count - 1) { currentQuiz = 0; MakeQuiz(); } else { currentQuiz += 1; } return(result); }