summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/BarrageQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/BarrageQueue.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/BarrageQueue.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/BarrageQueue.cs b/Client/Assets/Scripts/XMainClient/BarrageQueue.cs
new file mode 100644
index 00000000..be8b570d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/BarrageQueue.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+
+namespace XMainClient
+{
+ internal class BarrageQueue
+ {
+ public int queueCnt
+ {
+ get
+ {
+ return this.mItems.Count;
+ }
+ }
+
+ public int depth = 1;
+
+ private List<BarrageItem> mItems = new List<BarrageItem>();
+
+ public void Fire(BarrageItem item, string txt, bool outline)
+ {
+ this.mItems.Add(item);
+ item.Make(txt, this, outline);
+ this.depth++;
+ }
+
+ public bool FadeOut(BarrageItem item)
+ {
+ bool flag = this.mItems.Contains(item);
+ bool result;
+ if (flag)
+ {
+ this.mItems.Remove(item);
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public void ForceClear()
+ {
+ for (int i = 0; i < this.mItems.Count; i++)
+ {
+ bool flag = this.mItems[i] != null && this.mItems[i].gameObject != null;
+ if (flag)
+ {
+ this.mItems[i].Drop();
+ }
+ }
+ this.mItems.Clear();
+ this.depth = 1;
+ }
+ }
+}