Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
DramaEventEndRoll Class Reference
Inheritance diagram for DramaEventEndRoll:
DramaEvent EClass

Public Member Functions

override bool Play ()
 
void Init ()
 
- Public Member Functions inherited from DramaEvent
virtual bool Play ()
 
virtual void Reset ()
 

Properties

UIDynamicList list [get]
 
- Properties inherited from DramaEvent
DramaActor actor [get]
 
DramaManager manager [get]
 
LayerDrama layer [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Private Attributes

float timer
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Public Attributes inherited from DramaEvent
int progress
 
string idJump
 
string idActor
 
string step
 
float time
 
bool temp
 
DramaSequence sequence
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 5 of file DramaEventEndRoll.cs.

Member Function Documentation

◆ Init()

void DramaEventEndRoll.Init ( )
inline

Definition at line 54 of file DramaEventEndRoll.cs.

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 }
list. Add(item3)
static string ConvertName(string s)
static string TextCommon
Definition: CorePath.cs:65
UIDynamicList list
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Definition: IO.cs:11
static string[] LoadTextArray(string _path)
Definition: IO.cs:470
override void List()
override void Add(object o)
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

References Add(), UIDynamicList.Add(), ExcelData.BuildList(), UIDynamicList.Clear(), BackerContent.ConvertName(), item, list, UIDynamicList.List(), UIText.SetText(), UIItem.text1, and CorePath.CorePackage.TextCommon.

Referenced by Play().

◆ Play()

override bool DramaEventEndRoll.Play ( )
inlinevirtual

Reimplemented from DramaEvent.

Definition at line 11 of file DramaEventEndRoll.cs.

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 }
bool pressing
Definition: ButtonState.cs:35
bool pressedLong
Definition: ButtonState.cs:64
DramaSequence sequence
Definition: DramaEvent.cs:15
int progress
Definition: DramaEvent.cs:3
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
DynamicScrollView dsv

References UIDynamicList.dsv, DramaManager.endroll, Init(), EInput.IsAnyKeyDown(), EInput.leftMouse, list, DramaSequence.manager, ButtonState.pressedLong, ButtonState.pressing, DramaEvent.progress, EInput.rightMouse, DramaEvent.sequence, and timer.

Member Data Documentation

◆ timer

float DramaEventEndRoll.timer
private

Definition at line 7 of file DramaEventEndRoll.cs.

Referenced by Play().

Property Documentation

◆ list

UIDynamicList DramaEventEndRoll.list
get

Definition at line 9 of file DramaEventEndRoll.cs.

Referenced by Init(), and Play().


The documentation for this class was generated from the following file: