Exemple #1
0
    public static void CallEvent(int val)
    {
        if (val < dialogContainer.dialogs.Count && IsEvent(val))
        {
            string trigger = dialogContainer.dialogs[val].Trigger;
            Debug.Log(trigger);

            if (GameObject.Find("Canvas").transform.Find(trigger) != null)
            {
                GameObject mission = (GameObject.Find("Canvas").transform.Find(trigger).gameObject);
                mission.SetActive(true);
                MessageManager.isFocus = false;
            }
            else if (trigger == "ChangeScene")
            {
                MessageManager mm = GameObject.FindObjectOfType <MessageManager>();

                mm.ChangeScene("Main");
            }
        }
    }