Elin Modding Docs Doc
Loading...
Searching...
No Matches
DramaEventEndRoll.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5
6// Token: 0x0200010F RID: 271
8{
9 // Token: 0x170001BC RID: 444
10 // (get) Token: 0x06000715 RID: 1813 RVA: 0x0002ABC0 File Offset: 0x00028DC0
11 public UIDynamicList list
12 {
13 get
14 {
15 return this.sequence.manager.listCredit;
16 }
17 }
18
19 // Token: 0x06000716 RID: 1814 RVA: 0x0002ABD4 File Offset: 0x00028DD4
20 public override bool Play()
21 {
22 if (this.progress == 0)
23 {
24 this.sequence.manager.endroll.SetActive(true);
25 this.Init();
26 this.progress++;
27 }
28 else
29 {
30 this.timer += Time.deltaTime;
31 if (this.timer < 0.08f)
32 {
33 return false;
34 }
35 if (Input.GetKeyDown(KeyCode.Escape))
36 {
37 return true;
38 }
39 if (this.list.dsv.contentAnchoredPosition <= -this.list.dsv.contentSize + this.list.dsv.viewportSize + 1f)
40 {
41 if ((!EInput.rightMouse.pressedLong || !Application.isEditor) && EInput.IsAnyKeyDown(true))
42 {
43 return true;
44 }
45 }
46 else
47 {
48 float num = 1f;
49 if (EInput.leftMouse.pressing)
50 {
51 num = 10f;
52 }
53 if (EInput.rightMouse.pressing)
54 {
55 num = (Application.isEditor ? 200f : 30f);
56 }
57 this.list.dsv.contentAnchoredPosition += Time.deltaTime * this.sequence.manager.creditSpeed * num;
58 }
59 }
60 return false;
61 }
62
63 // Token: 0x06000717 RID: 1815 RVA: 0x0002AD04 File Offset: 0x00028F04
64 public void Init()
65 {
66 ExcelData excelData = new ExcelData("Data/Raw/credit", 1);
67 List<Dictionary<string, string>> items = excelData.BuildList("_default");
68 int index = 0;
69 this.list.Clear();
70 BaseList list = this.list;
71 UIList.Callback<string, UIItem> callback = new UIList.Callback<string, UIItem>();
72 callback.onRedraw = delegate(string a, UIItem b, int i)
73 {
74 b.text1.SetText(BackerContent.ConvertName(a));
75 };
76 callback.onList = delegate(UIList.SortMode m)
77 {
78 List<string> list2 = IO.LoadTextArray(CorePath.CorePackage.TextCommon + "endroll").ToList<string>();
79 for (int i = 0; i < Screen.height / 32 + 1; i++)
80 {
81 base.<Init>g__Space|0(true);
82 }
83 foreach (string text in list2)
84 {
85 if (text.StartsWith("#"))
86 {
87 string[] array = text.Replace("#", "").Split(',', StringSplitOptions.None);
88 string text2 = array[0];
89 int num = array[1].ToInt();
90 using (List<Dictionary<string, string>>.Enumerator enumerator2 = items.GetEnumerator())
91 {
92 while (enumerator2.MoveNext())
93 {
94 Dictionary<string, string> dictionary = enumerator2.Current;
95 int index;
96 if (index % 5 < num)
97 {
98 for (int j = 0; j < num; j++)
99 {
100 this.list.Add("");
101 index = index;
102 index++;
103 }
104 }
105 if ((text2 == "Abandon" && dictionary["abandon"] == "Yes") || dictionary["Pledge"] == text2)
106 {
107 base.<Init>g__AddBacker|1(dictionary["Name"]);
108 }
109 if (index % 5 >= 5 - num)
110 {
111 for (int k = 0; k < num; k++)
112 {
113 this.list.Add("");
114 index = index;
115 index++;
116 }
117 }
118 }
119 continue;
120 }
121 }
122 base.<Init>g__Add|2(text);
123 }
124 for (int l = 0; l < Screen.height / 32 / 2 - 1; l++)
125 {
126 base.<Init>g__Space|0(true);
127 }
128 };
129 list.callbacks = callback;
130 this.list.List();
131 }
132
133 // Token: 0x04000762 RID: 1890
134 private float timer;
135}