Ejemplo n.º 1
0
    private IEnumerator TestQuestions3()
    {
        yield return(new WaitForSeconds(0.01f));

        acUp.__TEST__SetState(AnswerState.WAITING_PLAYER_COME);
        acUp.__TEST__SetAlpha(1f);
        acDown.__TEST__SetState(AnswerState.WAITING_PLAYER_COME);
        acDown.__TEST__SetAlpha(1f);
        StartCoroutine(TestQuestions4());
    }
Ejemplo n.º 2
0
    private IEnumerator TestQuestions4()
    {
        while (true)
        {
            if (Input.GetKeyDown(KeyCode.RightArrow))
            {
                Destroy(acUp.gameObject);
                Destroy(acDown.gameObject);
                yield return(new WaitForSeconds(0.01f));

                q = QuestionGenerator.Instance.GetNew();
                QuestionBoardStorer.Instance.QuestionBoardController.SetQuestion(q);
                acUp   = AnswersFactory.Instance.CreateUp(q.correctAnswerType, q.correctAnswerContent);
                acDown = AnswersFactory.Instance.CreateDown(q.incorrectAnswerType, q.incorrectAnswerContent);
                yield return(new WaitForSeconds(0.01f));

                acUp.__TEST__SetState(AnswerState.WAITING_PLAYER_COME);
                acUp.__TEST__SetAlpha(1f);
                acDown.__TEST__SetState(AnswerState.WAITING_PLAYER_COME);
                acDown.__TEST__SetAlpha(1f);
            }
            yield return(null);
        }
    }