Exemplo n.º 1
0
 public void AddBluePrint(DialogueBluePrint bluePrint)
 {
     if (!m_LstBluePrint.Contains(bluePrint))
     {
         m_LstBluePrint.Add(bluePrint);
     }
 }
Exemplo n.º 2
0
 public void PlayDialogue(DialogueBluePrint bluePrint)
 {
     m_State = DialogueState.None;
     AddBluePrint(bluePrint);
     m_CurBluePrint = bluePrint;
     m_CurBluePrint.StartDialogue(this);
 }
Exemplo n.º 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]);
            }
        }