private void DisplayQuestion(Question p_question) { m_questionText.text = p_question.m_question; m_countDownRef.countdownValue = 30; m_state = QuestionStates.QUESTION; PlayQuestionClip(); LoadIllustrations(); m_countDownRef.StartCoroutine(m_countDownRef.StartCountdown()); }
void ShowVote() { m_audioSource2.Stop(); m_ansMng.m_isVoting = true; m_state = QuestionStates.VOTE; m_voteScreen.SetActive(true); m_countdownValue = 25; m_countDownRef.countdownValue = 25; m_countDownRef.StartCoroutine(m_countDownRef.StartCountdown()); }
IEnumerator ShowFact() { m_ansMng.m_isVoting = false; m_ansMng.Init(); m_state = QuestionStates.FACT; m_factQuestion.text = m_questionText.text; m_factText.text = m_qDb.m_questions[m_currentQuestionIndex].m_fact; m_countDownRef.countdownValue = 10; m_countDownRef.StartCoroutine(m_countDownRef.StartCountdown()); m_factScreen.SetActive(true); PlayFactClip(); yield return(new WaitForSeconds(10)); m_qDb.m_questions.RemoveAt(m_currentQuestionIndex); }
public void Calling_Finshish_method_should_change_state() { using (StringWriter output = new StringWriter()) { // arrange Mock <IUserTerminal> mock_user_terminal = new Mock <IUserTerminal>( ); mock_user_terminal.SetupGet(x => x.Printer).Returns(output); string text = "What's your name?"; MockQuestion question = new MockQuestion(text); QuestionStates state_before_call = question.State; // act question.Finish(); // assert Assert.Equal(QuestionStates.Initilaized, state_before_call); Assert.Equal(QuestionStates.Finished, question.State); } }