Пример #1
0
 /// <summary>
 /// 执行一个普通内容对话
 /// </summary>
 /// <param name="content"></param>
 public void DoContent(DialogueContent content)
 {
     m_CurNode = content;
     m_State   = DialogueState.Content;
     if (OnDoContent != null)
     {
         OnDoContent.Invoke(content);
     }
 }
Пример #2
0
 /// <summary>
 /// 执行一个选择分支对话
 /// </summary>
 /// <param name="choose"></param>
 public void DoChoose(DialogueChoose choose)
 {
     m_CurNode = choose;
     m_State   = DialogueState.Choose;
     if (OnDoChoose != null)
     {
         OnDoChoose.Invoke(choose);
     }
 }
Пример #3
0
        /// <summary>
        /// 结束
        /// </summary>
        /// <param name="param"></param>
        public void DoFinish(DialogueFinish finish)
        {
            m_CurNode = null;
            m_State   = DialogueState.Finish;
            if (OnDoFinish != null)
            {
                OnDoFinish.Invoke(finish);
            }

            //当前剧情结束,移除剧情
            m_LstBluePrint.Remove(m_CurBluePrint);
            m_CurBluePrint = null;

            //检测是否有可播放的剧情
            if (m_LstBluePrint.Count > 0)
            {
                Debug.LogError("PlayNext");
                PlayDialogue(m_LstBluePrint[0]);
            }
        }