void Start()
    {
        // display
        popUp          = mainContentPanel.transform.Find("Panel_Messages").gameObject;
        entryContainer = panelObject.transform.Find("Panel_Question_Creation_Story");
        dropdownAnswer = entryContainer.Find("Dropdown_Answer").GetComponent <Dropdown>();
        dropdownLevel  = entryContainer.Find("Dropdown_Level").GetComponent <Dropdown>();
        popUp.SetActive(false);
        conn = (API_Storymode)transform.GetComponent(typeof(API_Storymode));

        // button events
        panelObject.transform.Find("Button_Return").GetComponent <Button>().onClick.AddListener(ClickReturn);
        panelObject.transform.Find("Button_Save").GetComponent <Button>().onClick.AddListener(ClickSave);
        panelObject.transform.Find("Button_Clear").GetComponent <Button>().onClick.AddListener(ClickClear);
        popUp.transform.Find("Popup_Incomplete").Find("Button_Confirm").GetComponent <Button>().onClick.AddListener(popupQuestionIncompleteAcknowledge);
        popUp.transform.Find("Popup_Info").Find("Button_Confirm").GetComponent <Button>().onClick.AddListener(popupQuestionInfoAcknowledge);
        current_question = new StoryModeQuestion(World_Select_Script.worldChoice, Section_Select_Script.sectionChoice);
    }
예제 #2
0
    void Start()
    {
        // display
        popUp          = mainContentPanel.transform.Find("Panel_Messages").gameObject;
        entryContainer = panelObject.transform.Find("Panel_Question_Creation_Story");
        dropdownAnswer = entryContainer.Find("Dropdown_Answer").GetComponent <Dropdown>();
        dropdownLevel  = entryContainer.Find("Dropdown_Level").GetComponent <Dropdown>();
        popUp.SetActive(false);
        conn = (API_Storymode)transform.GetComponent(typeof(API_Storymode));
        panelObject.gameObject.SetActive(false);

        // button events
        panelObject.transform.Find("Button_Return").GetComponent <Button>().onClick.AddListener(ClickReturn);
        panelObject.transform.Find("Button_Save").GetComponent <Button>().onClick.AddListener(ClickSave);
        panelObject.transform.Find("Button_Clear").GetComponent <Button>().onClick.AddListener(ClickClear);
        panelObject.transform.Find("Button_Delete").GetComponent <Button>().onClick.AddListener(ClickDelete);
        popUp.transform.Find("Popup_Incomplete").Find("Button_Confirm").GetComponent <Button>().onClick.AddListener(popupQuestionIncompleteAcknowledge);
        popUp.transform.Find("Popup_Info").Find("Button_Confirm").GetComponent <Button>().onClick.AddListener(popupQuestionInfoAcknowledge);
        popUp.transform.Find("Popup_Delete").Find("Button_Cancel").GetComponent <Button>().onClick.AddListener(exitDelete);
        popUp.transform.Find("Popup_Delete").Find("Button_Confirm").GetComponent <Button>().onClick.AddListener(confirmDelete);

        fetchQuestions();
    }