summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XTaskDialog.cs
blob: e4253d423b90f6ef7a560a63dea40a3cc25f5506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
			}
		}
	}
}