コード例 #1
0
    protected void LoadQuestion(QuestionSystemEnums.QuestionType questionType)
    {
        Question questionLoaded = QuestionBuilder.GetQuestion(questionType);
        string   question       = questionLoaded.question;

        gameObject.transform.GetChild(0).GetComponent <Text> ().text = question;
        questionAnswer = questionLoaded.answers.Length == 2 ?
                         (questionLoaded.answers[0].ToUpper() + "/" + questionLoaded.answers[1].ToUpper()):
                         questionLoaded.answers[UnityEngine.Random.Range(0, questionLoaded.answers.Length)].ToUpper();
    }