Exemplo n.º 1
0
    public void Ask_Question(int QuestionNumber)
    {
        GQuestion.SetActive(true);
        if (QuestionNumber == 1)
        {
            askQuestionType1.Ask_Question();
        }
        if (QuestionNumber == 2)
        {
            askQuestionType2.Ask_Question();
        }
        if (QuestionNumber == 3)
        {
            askQuestionType3.Ask_Question();
        }
        if (QuestionNumber == 4)
        {
            askQuestionType4.Ask_Question();
        }
        if (QuestionNumber == 5)
        {
            askQuestionType5.Ask_Question();
        }

        NbDeQuestion.text = "Question #" + NbQuestion;
        NbQuestion++;
    }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        AskQuestionType3 askQuestion = (AskQuestionType3)target;

        if (GUILayout.Button("Demander une Question"))
        {
            askQuestion.Ask_Question();
        }

        base.OnInspectorGUI();
    }
Exemplo n.º 3
0
    public void Ask_Question()
    {
        maxValue = MaxValue + 1;
        int question = Random.Range(1, maxValue);

        if (question == 1)
        {
            askQuestionType1.Ask_Question();
        }
        if (question == 2)
        {
            askQuestionType2.Ask_Question();
        }
        if (question == 3)
        {
            askQuestionType3.Ask_Question();
        }
    }