diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XTaskDialog.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XTaskDialog.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XTaskDialog.cs | 42 |
1 files changed, 42 insertions, 0 deletions
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<XDialogSentence> Dialog
+ {
+ get
+ {
+ return this.m_Dialog;
+ }
+ }
+
+ private List<XDialogSentence> m_Dialog = new List<XDialogSentence>();
+
+ 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);
+ }
+ }
+ }
+}
|