public override void OnInspectorGUI()
    {
        AskQuestionType1 askQuestion = (AskQuestionType1)target;


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

        base.OnInspectorGUI();
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        GameData            = GameObject.Find("Game Data");
        DataScript          = GameData.GetComponent <GameData>();
        isAnsweringQuestion = false;
        askQuestionType1    = gameObject.GetComponent <AskQuestionType1>();
        askQuestionType2    = gameObject.GetComponent <AskQuestionType2>();
        askQuestionType3    = gameObject.GetComponent <AskQuestionType3>();
        askQuestionType4    = gameObject.GetComponent <AskQuestionType4>();
        askQuestionType5    = gameObject.GetComponent <AskQuestionType5>();
        TexteScore.text     = "Score: 0";
        DisableMessageText();

        QuestionCanvas.enabled = false;
        NbQuestion             = 1;
        TexteScore.enabled     = true;
    }
Beispiel #3
0
 private void Start()
 {
     askQuestionType1 = gameObject.GetComponent <AskQuestionType1>();
     askQuestionType2 = gameObject.GetComponent <AskQuestionType2>();
     askQuestionType3 = gameObject.GetComponent <AskQuestionType3>();
 }