Ejemplo n.º 1
0
 private void Start()
 {
     dialog = Global.m_dialog;
     if (dialogPoint.Length > 0)
     {
         dialogPoint[0] = Global.m_dialogPoint;
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Awake()
 {
     if (!once)
     {
         DontDestroyOnLoad(gameObject);
         once = true;
     }
     else
     {
         Destroy(gameObject);
     }
     m_dialog      = GameObject.FindObjectOfType <DialogManage>();
     m_frag        = GameObject.FindObjectOfType <FragmentSystem>();
     m_ui          = GameObject.FindObjectOfType <UIInterface>();
     m_pubSwitches = GameObject.FindObjectOfType <SwitchGroup>();
     m_sceneData   = GameObject.FindObjectOfType <SceneSaveData>();
 }
Ejemplo n.º 3
0
    public void StartDialog()
    {
        isOpen = true;
        //Debug.Log("dialog"+Global.m_dialog);
        //Debug.Log("container"+Global.m_dialog.container);
        if (Global.m_dialog == null)
        {
            Global.m_dialog = FindObjectOfType <DialogManage>();
            dialog          = Global.m_dialog;
        }
        Global.m_dialog.container.SetActive(true);
        //禁用一切玩家控制
        PlayerController.isused = false;
        int temp = int.Parse(content[0].Substring(0, 1));

        dialog.transform.position = Camera.main.WorldToScreenPoint(dialogPoint[temp].position);
        dialog.back.GetComponent <RectTransform>().rotation = dialogPoint[temp].rotation;
        dialog.SetText(content[0].Substring(1, content[0].Length - 1));
        StartCoroutine(ManageContent());
    }