示例#1
0
        // 根据名称 开始对话
        public void StartDialogByID(int dialogID)
        {
            //Debug.Log("DialogManage::StartDialogByName:" + name);
            DialogNodeConfig tempNode = GetDialogNodeByID(dialogID);

            if (null == tempNode)
            {
                //Debug.Log("DialogManage::StartDialogByName:" + name + " tempNode is null");
                return;
            }

            if (null == tempNode.DialogArr || tempNode.DialogArr.Count <= 0)
            {
                //Debug.Log("DialogManage::StartDialogByName:" + name + " tempNode.DialogArr is no string");
                return;
            }

            gameObject.SetActive(true);
            m_curDialogNode       = tempNode;
            m_iCurDialogItemIndex = 0;
            ShowDialogText(tempNode.DialogArr[m_iCurDialogItemIndex]);
            m_bIsStartDialog = true;

            //开始对话,角色不能移动
            GameManager.instance.playerInDialog = true;
        }
示例#2
0
        public void EndDialog()
        {
            m_bIsStartDialog      = false;
            m_iCurDialogItemIndex = 0;
            m_curDialogNode       = null;
            gameObject.SetActive(false);

            //结束对话
            GameManager.instance.playerInDialog = false;
            //Debug.Log("DialogManage::EndDialog");
        }