summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XTaskDialog.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XTaskDialog.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XTaskDialog.cs42
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);
+ }
+ }
+ }
+}