From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XTaskDialog.cs | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XTaskDialog.cs (limited to 'Client/Assets/Scripts/XMainClient/XTaskDialog.cs') diff --git a/Client/Assets/Scripts/XMainClient/XTaskDialog.cs b/Client/Assets/Scripts/XMainClient/XTaskDialog.cs new file mode 100644 index 00000000..e4253d42 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XTaskDialog.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; + +namespace XMainClient +{ + internal class XTaskDialog + { + public List Dialog + { + get + { + return this.m_Dialog; + } + } + + private List m_Dialog = new List(); + + public void Reset() + { + this.m_Dialog.Clear(); + } + + public void Append(XDialogSentence sentence) + { + this.m_Dialog.Add(sentence); + } + + public void Append(int talker, string content, string voice = null) + { + this.m_Dialog.Add(new XDialogSentence(talker, content, voice, false)); + } + + public void TryAppend(XDialogSentence sentence) + { + bool inited = sentence.Inited; + if (inited) + { + this.Append(sentence); + } + } + } +} -- cgit v1.1-26-g67d0