Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
DramaEventEndRoll.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3using UnityEngine;
4
6{
7 private float timer;
8
10
11 public override bool Play()
12 {
13 if (progress == 0)
14 {
15 sequence.manager.endroll.SetActive(enable: true);
16 Init();
17 progress++;
18 }
19 else
20 {
21 timer += Time.deltaTime;
22 if (timer < 0.08f)
23 {
24 return false;
25 }
26 if (Input.GetKeyDown(KeyCode.Escape))
27 {
28 return true;
29 }
30 if (list.dsv.contentAnchoredPosition <= 0f - list.dsv.contentSize + list.dsv.viewportSize + 1f)
31 {
32 if ((!EInput.rightMouse.pressedLong || !Application.isEditor) && EInput.IsAnyKeyDown())
33 {
34 return true;
35 }
36 }
37 else
38 {
39 float num = 1f;
41 {
42 num = 10f;
43 }
45 {
46 num = (Application.isEditor ? 200f : 30f);
47 }
48 list.dsv.contentAnchoredPosition += Time.deltaTime * sequence.manager.creditSpeed * num;
49 }
50 }
51 return false;
52 }
53
54 public void Init()
55 {
56 ExcelData excelData = new ExcelData("Data/Raw/credit", 1);
57 List<Dictionary<string, string>> items = excelData.BuildList();
58 int index = 0;
59 list.Clear();
60 list.callbacks = new UIList.Callback<string, UIItem>
61 {
62 onRedraw = delegate(string a, UIItem b, int i)
63 {
65 },
66 onList = delegate
67 {
68 List<string> list = IO.LoadTextArray(CorePath.CorePackage.TextCommon + "endroll").ToList();
69 for (int k = 0; k < Screen.height / 32 + 1; k++)
70 {
71 Space(newline: true);
72 }
73 foreach (string item in list)
74 {
75 if (item.StartsWith("#"))
76 {
77 string[] array = item.Replace("#", "").Split(',');
78 string text = array[0];
79 int num2 = array[1].ToInt();
80 foreach (Dictionary<string, string> item2 in items)
81 {
82 if (index % 5 < num2)
83 {
84 for (int l = 0; l < num2; l++)
85 {
86 this.list.Add("");
87 index++;
88 }
89 }
90 if ((text == "Abandon" && item2["abandon"] == "Yes") || item2["Pledge"] == text)
91 {
92 AddBacker(item2["Name"]);
93 }
94 if (index % 5 >= 5 - num2)
95 {
96 for (int n = 0; n < num2; n++)
97 {
98 this.list.Add("");
99 index++;
100 }
101 }
102 }
103 }
104 else
105 {
106 Add(item);
107 }
108 }
109 for (int num3 = 0; num3 < Screen.height / 32 / 2 - 1; num3++)
110 {
111 Space(newline: true);
112 }
113 }
114 };
115 list.List();
116 void Add(string s)
117 {
118 Space(newline: false);
119 list.Add("");
120 list.Add("");
121 list.Add(s);
122 list.Add("");
123 list.Add("");
124 index += 5;
125 }
126 void AddBacker(string s)
127 {
128 list.Add(s);
129 index++;
130 }
131 void Space(bool newline)
132 {
133 int num = (newline ? 5 : 0);
134 if (index % 5 != 0)
135 {
136 num += 5 - index % 5;
137 }
138 for (int j = 0; j < num; j++)
139 {
140 list.Add("");
141 index++;
142 }
143 }
144 }
145}
list. Add(item3)
static string ConvertName(string s)
bool pressing
Definition: ButtonState.cs:35
bool pressedLong
Definition: ButtonState.cs:64
static string TextCommon
Definition: CorePath.cs:65
override bool Play()
UIDynamicList list
DramaSequence sequence
Definition: DramaEvent.cs:15
int progress
Definition: DramaEvent.cs:3
UIDynamicList listCredit
Definition: DramaManager.cs:19
Transform endroll
Definition: DramaManager.cs:23
DramaManager manager
Definition: EInput.cs:8
static bool IsAnyKeyDown(bool includeAxis=true, bool _skipframe=true)
Definition: EInput.cs:619
static ButtonState leftMouse
Definition: EInput.cs:349
static ButtonState rightMouse
Definition: EInput.cs:351
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
override void List()
override void Add(object o)
DynamicScrollView dsv
override void Clear()
Definition: UIItem.cs:5
UIText text1
Definition: UIItem.cs:6
Definition: UIList.cs:9
void SetText(string s)
Definition: UIText.cs:159