Exemple #1
0
        void  Awake()
        {
            CloseQuestLog();

            // SetQuestLogPosition();

            QuestButtons.Clear();

            QuestButtonVars NewButtonVars = new QuestButtonVars();

            NewButtonVars.ButtonObj  = QuestButton.GetComponent <Button> ();
            NewButtonVars.ButtonText = QuestButton.transform.GetComponentInChildren <Text> ();
            QuestButton.gameObject.GetComponent <QuestButton> ().ID = 0;

            QuestButtons.Add(NewButtonVars);
        }
Exemple #2
0
        public void AddQuestLogButton()
        {
            GameObject NewButton = (GameObject)Instantiate(QuestButton.gameObject);

            NewButton.transform.SetParent(QuestButtonsParent, true);
            NewButton.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);

            QuestButtonVars NewButtonVars = new QuestButtonVars();

            NewButtonVars.ButtonObj  = NewButton.GetComponent <Button> ();
            NewButtonVars.ButtonText = NewButton.transform.GetComponentInChildren <Text> ();
            NewButton.gameObject.GetComponent <QuestButton> ().ID = QuestButtons.Count;

            QuestButtons.Add(NewButtonVars);


            NewButton.gameObject.SetActive(false);
        }