Elin Decompiled Documentation EA 23.233 Nightly Patch 1
Loading...
Searching...
No Matches
DramaManager Class Reference
Inheritance diagram for DramaManager:
EMono

Public Member Functions

DramaSequence Play (DramaSetup setup)
 
DramaSequence Load ()
 
void AddCustomEvents (string idCustom="Resident")
 
void ParseLine (Dictionary< string, string > item)
 
DramaActor GetActor (string id)
 
DramaEvent AddEvent (DramaEvent e)
 
DramaEventMethod AddEvent (Action func, float duration=0f, bool halt=false)
 
DramaEventMethod AddEvent (Action func, Func< string > funcJump)
 
DramaEvent CustomEvent (Action func, string step=null, float duration=0f, bool halt=false)
 
void SetDialog (string id="Default")
 
bool CheckIF (string IF)
 
void Show ()
 
void Hide ()
 

Public Attributes

LayerDrama layer
 
CanvasGroup cg
 
CanvasGroup cgCover
 
UIDynamicList listCredit
 
Transform actorPos
 
Transform endroll
 
DramaActor moldActor
 
DramaSequence sequence
 
DramaOutcome outcome
 
DialogDrama dialog
 
DramaSetup setup
 
GameObject goSkip
 
Image imageBG
 
Image imageCover
 
Font[] fonts
 
Person tg
 
bool bgmChanged
 
List< DramaChoice_choices = new List<DramaChoice>()
 
Dictionary< string, string > customTalkTopics = new Dictionary<string, string>()
 
Dictionary< string, string > dictLocalize = new Dictionary<string, string>()
 
float creditSpeed
 
DramaEventTalk lastTalk
 
bool enableTone
 
bool customEventsAdded
 
bool idDefaultPassed
 
int countLine
 

Static Public Attributes

static Chara TG
 
static Dictionary< string, ExcelDatadictCache = new Dictionary<string, ExcelData>()
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

DramaActor tgActor [get]
 
- Properties inherited from EMono
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 Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void Update ()
 

Private Attributes

List< DramaEventcustomEvents = new List<DramaEvent>()
 
string lastIF
 
string lastIF2
 
string idDefault
 
string textReplace
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Detailed Description

Definition at line 9 of file DramaManager.cs.

Member Function Documentation

◆ AddCustomEvents()

void DramaManager.AddCustomEvents ( string  idCustom = "Resident")
inline

Definition at line 168 of file DramaManager.cs.

169 {
171 {
172 return;
173 }
174 DramaCustomSequence dramaCustomSequence = new DramaCustomSequence
175 {
176 manager = this,
178 idCustom = idCustom,
179 events = customEvents,
182 };
183 CustomEvent(delegate
184 {
185 sequence.Exit();
186 });
187 if (tg != null && tg.hasChara)
188 {
189 TG = tg.chara;
190 dramaCustomSequence.Build(tg.chara);
191 }
192 if (!sequence.setup.textData.IsEmpty())
193 {
194 dramaCustomSequence.BuildTextData();
195 }
196 foreach (DramaEvent customEvent in customEvents)
197 {
198 AddEvent(customEvent);
199 }
200 customEventsAdded = true;
201 }
DramaSequence sequence
Definition: DramaManager.cs:27
bool customEventsAdded
Definition: DramaManager.cs:65
DramaEvent CustomEvent(Action func, string step=null, float duration=0f, bool halt=false)
string idDefault
Definition: DramaManager.cs:71
List< DramaEvent > customEvents
Definition: DramaManager.cs:47
DramaEvent AddEvent(DramaEvent e)
static Chara TG
Definition: DramaManager.cs:11
DramaSetup setup
Definition: DramaManager.cs:33
DramaSetup setup
string textData
Definition: DramaSetup.cs:11
bool hasChara
Definition: Person.cs:38
Chara chara
Definition: Person.cs:36

References AddEvent(), DramaCustomSequence.Build(), DramaCustomSequence.BuildTextData(), Person.chara, CustomEvent(), customEvents, customEventsAdded, DramaSequence.Exit(), Person.hasChara, idDefault, sequence, setup, DramaSequence.setup, DramaSetup.textData, TG, and tg.

Referenced by Load(), and ParseLine().

◆ AddEvent() [1/3]

DramaEventMethod DramaManager.AddEvent ( Action  func,
float  duration = 0f,
bool  halt = false 
)
inline

Definition at line 1022 of file DramaManager.cs.

1023 {
1024 return sequence.AddEvent(e);
1025 }
DramaEvent AddEvent(DramaEvent e)

References DramaSequence.AddEvent().

◆ AddEvent() [2/3]

DramaEventMethod DramaManager.AddEvent ( Action  func,
Func< string >  funcJump 
)
inline

Definition at line 1027 of file DramaManager.cs.

1028 {
1029 return AddEvent(new DramaEventMethod(func, duration, halt)) as DramaEventMethod;
1030 }
1031
1032 public DramaEventMethod AddEvent(Action func, Func<string> funcJump)
1033 {

◆ AddEvent() [3/3]

DramaEvent DramaManager.AddEvent ( DramaEvent  e)
inline

Definition at line 1017 of file DramaManager.cs.

1018 {
1019 return sequence.GetActor(id);
1020 }
DramaActor GetActor(string id)

References DramaSequence.GetActor().

Referenced by AddCustomEvents(), GetActor(), and ParseLine().

◆ CheckIF()

bool DramaManager.CheckIF ( string  IF)
inline

Definition at line 1062 of file DramaManager.cs.

1068 {
1069 if (IF == null || IF.IsEmpty())
1070 {
1071 return true;
1072 }
1073 string[] array = IF.Split(',');
1074 switch (array[0])
1075 {
1076 case "garden_bloom":
1077 foreach (Chara member in EMono.pc.party.members)
1078 {
1079 if (member.CanBloom())
1080 {
1081 return true;
1082 }
1083 }
1084 return false;
1085 case "duponne_mino":
1086 return EMono.pc.things.Find("minohorn") != null;
1087 case "duponne_rescued":
1088 if (EMono.game.quests.GetPhase<QuestNegotiationDarkness>() == 4)
1089 {
1090 return EMono._map.FindChara("lurie_boss") != null;
1091 }
1092 return false;
1093 case "duponne_gone":
1094 if (EMono.game.quests.GetPhase<QuestNegotiationDarkness>() == 4 && !EMono.player.flags.killedDuponne && EMono._map.FindChara("lurie_boss") == null)
1095 {
1096 return EMono.pc.things.Find("duponneball") == null;
1097 }
1098 return false;
1099 case "duponne_killed":
1100 if (EMono.game.quests.GetPhase<QuestNegotiationDarkness>() == 4)
1101 {
1103 }
1104 return false;
1105 case "survival":
1106 return EMono.game.IsSurvival;
1107 case "!survival":
1108 return !EMono.game.IsSurvival;
1109 case "fromBook":
1110 return LayerDrama.fromBook;
1111 case "nerun_nadenade":
1112 if (!EMono.game.startVersion.IsBelow(0, 23, 232))
1113 {
1114 return EMono.player.stats.death2 == 0;
1115 }
1116 return false;
1117 case "nerun_nadenade2":
1118 GameLang.refDrama1 = EMono.player.stats.death2.ToString() ?? "";
1119 return EMono.player.stats.death2 >= 100;
1120 case "!fromBook":
1121 return !LayerDrama.fromBook;
1122 case "WindRest":
1123 return EMono._zone is Zone_WindRest;
1124 case "guild_promote":
1125 return Guild.CurrentDrama.relation.exp >= Guild.CurrentDrama.relation.ExpToNext;
1126 case "guild_maxpromote":
1127 return Guild.CurrentDrama.relation.rank >= Guild.CurrentDrama.relation.MaxRank;
1128 case "scratch_check":
1129 return EMono.game.dateScratch > EMono.game.world.date.GetRaw();
1130 case "sister_money":
1131 return EMono.pc.GetCurrency() >= 10000;
1132 case "fiamaPet":
1133 if (EMono.pc.homeBranch != null)
1134 {
1135 foreach (Chara member2 in EMono.pc.homeBranch.members)
1136 {
1137 if (member2.isDead && member2.CanRevive() && member2.GetInt(100) != 0)
1138 {
1139 return true;
1140 }
1141 }
1142 }
1143 return false;
1144 case "hasMelilithCurse":
1145 return EMono.pc.HasElement(1206);
1146 case "merchant":
1147 return Guild.CurrentDrama == Guild.Merchant;
1148 case "fighter":
1149 return Guild.CurrentDrama == Guild.Fighter;
1150 case "thief":
1151 return Guild.CurrentDrama == Guild.Thief;
1152 case "mage":
1153 return Guild.CurrentDrama == Guild.Mage;
1154 case "hasDLC":
1155 return Steam.HasDLC(array[1].ToEnum<ID_DLC>());
1156 case "hasFlag":
1157 return EMono.player.dialogFlags.TryGetValue(array[1], 0) != 0;
1158 case "!hasFlag":
1159 return EMono.player.dialogFlags.TryGetValue(array[1], 0) == 0;
1160 case "!hasMiscreation":
1161 return !EMono.pc.party.HasElement(1248, excludePC: true);
1162 case "hasItem":
1163 return EMono.pc.things.Find(array[1]) != null;
1164 case "nasuDeliver":
1165 if (EMono.game.quests.GetPhase<QuestNasu>() == 2)
1166 {
1167 return EMono.pc.things.Find("backpack_holding") != null;
1168 }
1169 return false;
1170 case "isCompleted":
1171 return EMono.game.quests.IsCompleted(array[1]);
1172 case "costRecruit":
1173 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1174 {
1175 return EMono.pc.GetCurrency("money2") >= CalcGold.Hire(tg.chara);
1176 }
1177 return true;
1178 case "costRecruitTicket":
1179 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1180 {
1181 return EMono.pc.things.Find("ticket_resident") != null;
1182 }
1183 return false;
1184 case "letterTrial":
1186 {
1187 return EMono.pc.things.Find("letter_trial") != null;
1188 }
1189 return false;
1190 default:
1191 if (array.Length > 2)
1192 {
1193 int value;
1194 bool flag = EMono.player.dialogFlags.TryGetValue(array[1], out value);
1195 int num = 0;
1196 if (array[1].StartsWith("*"))
1197 {
1198 string text = array[1].TrimStart('*');
1199 Quest quest = EMono.game.quests.Get(text);
1200 if (text == "guild")
1201 {
1202 quest = Guild.CurrentQuest;
1203 }
1204 flag = quest != null;
1205 if (!EMono.game.quests.completedIDs.Contains(text))
1206 {
1207 value = quest?.phase ?? (-1);
1208 }
1209 else
1210 {
1211 value = 999;
1212 flag = true;
1213 }
1214 num = ((!int.TryParse(array[2], out var result)) ? ((quest != null) ? array[2].ToInt(quest.GetType()) : 0) : result);
1215 }
1216 else
1217 {
1218 num = int.Parse(array[2]);
1219 }
1220 switch (array[0])
1221 {
1222 case "=":
1223 if (!flag && num == -1)
1224 {
1225 return true;
1226 }
1227 if (flag && value == num)
1228 {
1229 return true;
1230 }
1231 break;
1232 case "!":
1233 if (!flag || value != num)
1234 {
1235 return true;
1236 }
1237 break;
1238 case ">":
1239 if (flag && value > num)
1240 {
1241 return true;
1242 }
1243 break;
1244 case ">=":
1245 if (flag && value >= num)
1246 {
1247 return true;
1248 }
1249 break;
1250 case "<":
1251 if (!flag || value < num)
1252 {
1253 return true;
1254 }
1255 break;
1256 case "<=":
1257 if (!flag || value <= num)
1258 {
1259 return true;
1260 }
1261 break;
1262 }
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
static int Hire(Chara c)
Definition: CalcGold.cs:8
bool HasElement(int ele, int req=1)
Definition: Card.cs:5845
int GetCurrency(string id="money")
Definition: Card.cs:3924
ThingContainer things
Definition: Card.cs:38
Definition: Chara.cs:10
bool CanRevive()
Definition: Chara.cs:5038
Party party
Definition: Chara.cs:43
bool CanBloom()
Definition: Chara.cs:8516
FactionBranch homeBranch
Definition: Chara.cs:1064
bool isDead
Definition: Chara.cs:387
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
static Game game
Definition: EMono.cs:7
static FactionBranch Branch
Definition: EMono.cs:21
static Map _map
Definition: EMono.cs:17
bool IsRecruit(Chara c)
List< Chara > members
FactionRelation relation
Definition: FACTION.cs:126
bool IsSurvival
Definition: Game.cs:275
Version startVersion
Definition: Game.cs:170
new World world
Definition: Game.cs:176
QuestManager quests
Definition: Game.cs:182
Definition: Guild.cs:2
static Guild CurrentDrama
Definition: Guild.cs:24
static GuildMerchant Merchant
Definition: Guild.cs:62
static QuestGuild CurrentQuest
Definition: Guild.cs:64
static GuildMage Mage
Definition: Guild.cs:58
static GuildFighter Fighter
Definition: Guild.cs:56
static GuildThief Thief
Definition: Guild.cs:60
static bool fromBook
Definition: LayerDrama.cs:16
Chara FindChara(string id)
Definition: Map.cs:2568
bool HasElement(int ele, bool excludePC=false)
Definition: Party.cs:194
List< Chara > members
Definition: Party.cs:19
bool killedDuponne
Definition: Player.cs:563
int death2
Definition: Player.cs:108
Flags flags
Definition: Player.cs:1094
Stats stats
Definition: Player.cs:1016
Dictionary< string, int > dialogFlags
Definition: Player.cs:1040
HashSet< string > completedIDs
Definition: QuestManager.cs:17
bool IsCompleted(string id)
Quest Get(string id)
Definition: Quest.cs:7
int phase
Definition: Quest.cs:40
Definition: Steam.cs:8
static bool HasDLC(ID_DLC id)
Definition: Steam.cs:39
Thing Find(int uid)
GameDate date
Definition: World.cs:6
bool IsBelow(int _major, int _minor, int _batch)
Definition: Version.cs:31

Referenced by ParseLine().

◆ CustomEvent()

DramaEvent DramaManager.CustomEvent ( Action  func,
string  step = null,
float  duration = 0f,
bool  halt = false 
)
inline

Definition at line 1035 of file DramaManager.cs.

1035 {
1036 jumpFunc = funcJump
1037 }) as DramaEventMethod;
1038 }
1039
1040 public DramaEvent CustomEvent(Action func, string step = null, float duration = 0f, bool halt = false)
1041 {
1042 DramaEventMethod dramaEventMethod = new DramaEventMethod(func, duration, halt)
1043 {

Referenced by AddCustomEvents().

◆ GetActor()

DramaActor DramaManager.GetActor ( string  id)
inline

Definition at line 1012 of file DramaManager.cs.

1012 {
1013 AddEvent(new DramaEventGoto(jump));
1014 }
1015 }

References AddEvent().

◆ Hide()

void DramaManager.Hide ( )
inline

Definition at line 1272 of file DramaManager.cs.

1272 : true);
1273 layer.cg.alpha = 0f;
1274 layer.cg.DOFade(1f, 0.3f);
1275 }
LayerDrama layer
Definition: DramaManager.cs:13
CanvasGroup cg
Definition: LayerDrama.cs:30

Referenced by ParseLine().

◆ Load()

DramaSequence DramaManager.Load ( )
inline

Definition at line 113 of file DramaManager.cs.

114 {
115 sequence.Clear();
116 customEvents.Clear();
117 customTalkTopics.Clear();
118 moldActor = actorPos.CreateMold<DramaActor>();
119 if (tg != null)
120 {
121 sequence.AddActor("tg", tg);
122 }
123 sequence.AddActor("pc", new Person(EMono.pc));
124 string text = CorePath.DramaData + setup.book + ".xlsx";
125 ExcelData excelData = dictCache.TryGetValue(text);
126 if (excelData != null && excelData.IsModified())
127 {
128 excelData = null;
129 }
130 if (excelData == null)
131 {
132 excelData = new ExcelData();
133 }
134 excelData.maxEmptyRows = 10;
135 excelData.path = text;
136 List<Dictionary<string, string>> list = excelData.BuildList(setup.sheet);
137 if (!Lang.isBuiltin && dictLocalize.Count == 0)
138 {
139 foreach (Dictionary<string, string> item in new ExcelData
140 {
141 maxEmptyRows = 10,
142 path = CorePath.DramaDataLocal + setup.book + ".xlsx"
144 {
145 string text2 = item["id"];
146 if (!text2.IsEmpty() && !item["text"].IsEmpty())
147 {
148 dictLocalize.Add(text2, item["text"]);
149 }
150 }
151 }
152 dictCache[text] = excelData;
154 lastTalk = null;
156 countLine = 0;
157 for (int i = 0; i < list.Count; i++)
158 {
159 ParseLine(list[i]);
160 countLine++;
161 }
163 sequence.steps["end"] = 99999;
164 sequence.AddActor("narrator", new Person("narrator"));
165 return sequence;
166 }
Dictionary< string, string > dictLocalize
Definition: DramaManager.cs:53
static Dictionary< string, ExcelData > dictCache
Definition: DramaManager.cs:75
Transform actorPos
Definition: DramaManager.cs:21
bool idDefaultPassed
Definition: DramaManager.cs:67
void ParseLine(Dictionary< string, string > item)
void AddCustomEvents(string idCustom="Resident")
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:51
DramaActor moldActor
Definition: DramaManager.cs:25
DramaEventTalk lastTalk
Definition: DramaManager.cs:61
DramaActor AddActor(string id, Person person)
Dictionary< string, int > steps
string sheet
Definition: DramaSetup.cs:5
string step
Definition: DramaSetup.cs:7
bool IsModified()
Definition: ExcelData.cs:72
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Definition: Lang.cs:6
static bool isBuiltin
Definition: Lang.cs:42
Definition: Person.cs:6

References actorPos, DramaSequence.AddActor(), AddCustomEvents(), ExcelData.BuildList(), DramaSequence.Clear(), countLine, customEvents, customEventsAdded, customTalkTopics, dictCache, dictLocalize, enableTone, idDefault, idDefaultPassed, Lang.isBuiltin, ExcelData.IsModified(), item, lastTalk, moldActor, ParseLine(), EMono.pc, sequence, setup, DramaSetup.sheet, DramaSetup.step, DramaSequence.steps, and tg.

Referenced by ParseLine(), and Play().

◆ ParseLine()

void DramaManager.ParseLine ( Dictionary< string, string >  item)
inline

Definition at line 203 of file DramaManager.cs.

204 {
205 string[] array = (item.ContainsKey("action") ? item["action"].Split('/') : null);
206 string action = ((array != null) ? array[0] : null);
207 string text2 = (item.ContainsKey("step") ? item["step"] : null);
208 if (text2 == "//")
209 {
210 return;
211 }
212 if (text2 == idDefault)
213 {
214 idDefaultPassed = true;
215 }
216 string actor = (item.ContainsKey("actor") ? item["actor"] : "#1");
217 string[] p = (item.ContainsKey("param") ? item["param"].Split(',') : new string[0]);
218 string p2 = ((p.Length != 0) ? p[0] : "");
219 string p3 = ((p.Length > 1) ? p[1] : "");
220 string p4 = ((p.Length > 2) ? p[2] : "");
221 float.TryParse(p2, out var p0f);
222 float.TryParse(p3, out var result);
223 bool flag = !item["text_JP"].IsEmpty();
224 item.TryGetValue("text_JP");
225 string text = null;
226 if (flag)
227 {
228 if (!Lang.isBuiltin)
229 {
230 string key = item["id"];
231 if (dictLocalize.ContainsKey(key))
232 {
233 text = dictLocalize[key];
234 }
235 else
236 {
237 text = item.TryGetValue("text_EN");
238 }
239 }
240 else
241 {
242 text = item["text_" + Lang.langCode];
243 }
244 }
245 if (flag && text.StartsWith("$") && tg != null && tg.hasChara)
246 {
247 string text3 = text.Split(' ')[0];
248 text = text.Replace(text3, tg.chara.GetTalkText(text3.Remove(0, 1)));
249 }
250 string jump = (item.ContainsKey("jump") ? item["jump"] : null);
251 string text4 = (item.ContainsKey("if") ? item["if"] : null);
252 string iF = (item.ContainsKey("if2") ? item["if2"] : null);
253 string cHECK = (item.ContainsKey("check") ? item["check"] : null);
254 bool flag2 = false;
255 if (text2 != null && !sequence.steps.ContainsKey(text2) && action != "choice" && action != "cancel")
256 {
257 sequence.steps.Add(text2, sequence.events.Count);
258 }
259 if (text4 == "*")
260 {
261 text4 = lastIF;
262 iF = lastIF2;
263 }
264 else
265 {
266 lastIF = text4;
267 lastIF2 = iF;
268 }
269 if (!CheckIF(text4) || !CheckIF(iF))
270 {
271 if (action == "reload")
272 {
273 string id = "flag" + countLine;
274 sequence.AddStep(id);
275 }
276 return;
277 }
278 if (LayerDrama.fromBook && action == "editPlaylist")
279 {
280 action = "BGM";
281 }
282 switch (action)
283 {
284 case "disableFullPortrait":
285 AddEvent(delegate
286 {
287 sequence.fullPortrait = false;
288 });
289 break;
290 case "enableTone":
291 enableTone = true;
292 break;
293 case "canSkip":
294 AddEvent(delegate
295 {
296 sequence.skipJump = p2;
297 });
298 break;
299 case "screenLock":
301 break;
302 case "haltBGM":
303 EMono.Sound.haltUpdate = true;
304 break;
305 case "forceBGM":
306 AddEvent(delegate
307 {
308 SoundManager.ForceBGM();
309 });
310 break;
311 case "setFlag":
312 AddEvent(delegate
313 {
314 if (p2.StartsWith("*"))
315 {
316 Quest quest3 = EMono.game.quests.Get(p2.TrimStart('*'));
317 quest3?.ChangePhase(p3.ToInt(quest3.GetType()));
318 }
319 else
320 {
321 EMono.player.dialogFlags[p2] = (p3.IsEmpty() ? 1 : int.Parse(p3));
322 }
323 });
324 break;
325 case "reload":
326 {
327 string __step = "flag" + countLine;
328 AddEvent(delegate
329 {
330 Load();
331 sequence.Play(jump.IsEmpty(__step));
332 }, 0.01f, halt: true);
333 sequence.AddStep(__step);
334 break;
335 }
336 case "inject":
337 {
338 DramaEventTalk dramaEventTalk = lastTalk;
339 if (idDefaultPassed)
340 {
341 AddCustomEvents(p2);
342 }
343 lastTalk = dramaEventTalk;
344 break;
345 }
346 case "topic":
347 customTalkTopics[p2] = text;
348 break;
349 case "cancel":
350 lastTalk.canCancel = true;
351 lastTalk.idCancelJump = jump;
352 break;
353 case "_choices":
354 foreach (DramaChoice choice in _choices)
355 {
356 lastTalk.AddChoice(choice);
357 }
358 break;
359 case "choice":
360 if (!CheckIF(text4) || !CheckIF(iF))
361 {
362 break;
363 }
364 if (array.Length > 1)
365 {
366 switch (array[1])
367 {
368 case "quest":
369 text = "deQuest".lang();
370 jump = "_quest";
371 break;
372 case "depart":
373 text = "depart".lang();
374 jump = "_depart";
375 break;
376 case "rumor":
377 text = "letsTalk".lang();
378 jump = "_rumor";
379 break;
380 case "buy":
381 text = "daBuy".lang();
382 jump = "_buy";
383 break;
384 case "sell":
385 text = "daSell".lang();
386 jump = "_sell";
387 break;
388 case "give":
389 text = "daGive".lang();
390 jump = "_give";
391 break;
392 case "trade":
393 text = "daTrade".lang();
394 jump = "_trade";
395 break;
396 case "bye":
397 text = "bye".lang();
398 jump = "_bye";
399 break;
400 }
401 }
402 flag2 = true;
403 lastTalk.AddChoice(new DramaChoice(text, jump, p2, cHECK, text4));
404 break;
405 case "addTempActor":
406 {
407 Person person = new Person(actor);
408 Chara chara = EMono.game.cards.globalCharas.Find(actor) ?? EMono._map.FindChara(actor);
409 if (chara != null)
410 {
411 person.SetChara(chara);
412 }
413 sequence.AddActor(actor, person);
414 break;
415 }
416 case "addActor":
417 {
418 if (actor == "god")
419 {
421 break;
422 }
423 DramaActor dramaActor = sequence.AddActor(actor, new Person(actor));
424 if (!text.IsEmpty())
425 {
426 dramaActor.owner.tempName = text;
427 }
428 break;
429 }
430 case "invoke":
432 {
433 break;
434 }
435 if (jump.IsEmpty())
436 {
437 AddEvent(delegate
438 {
439 typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null);
440 });
441 break;
442 }
443 AddEvent(delegate
444 {
445 }, () => (!(bool)typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null)) ? "" : jump);
446 flag2 = true;
447 break;
448 case "refAction1":
449 AddEvent(delegate
450 {
452 });
453 break;
454 case "refAction2":
455 AddEvent(delegate
456 {
458 });
459 break;
460 case "setBG":
461 AddEvent(delegate
462 {
463 if (p2.IsEmpty())
464 {
465 imageBG.enabled = false;
466 }
467 else
468 {
469 imageBG.enabled = true;
470 imageBG.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + p2);
471 }
472 });
473 break;
474 case "setBG2":
475 AddEvent(delegate
476 {
477 Util.Instantiate<Transform>("Media/Graphics/Image/Drama/" + p2, layer).SetAsFirstSibling();
478 });
479 break;
480 case "glitch":
481 AddEvent(delegate
482 {
483 DramaActor.useGlitch = true;
484 });
485 break;
486 case "setDialog":
487 AddEvent(delegate
488 {
489 SetDialog(p2);
490 });
491 break;
492 case "Playlist":
493 AddEvent(delegate
494 {
495 LayerDrama.haltPlaylist = false;
496 EMono.Sound.StopBGM();
497 EMono.Sound.currentBGM = null;
498 bgmChanged = true;
499 });
500 break;
501 case "editPlaylist":
502 AddEvent(delegate
503 {
504 List<int> list = new List<int>();
505 string[] array2 = p;
506 foreach (string s in array2)
507 {
508 list.Add(int.Parse(s));
509 }
510 EMono._zone.SetBGM(list);
511 });
512 break;
513 case "BGM":
514 AddEvent(delegate
515 {
516 LayerDrama.haltPlaylist = true;
517 LayerDrama.maxBGMVolume = true;
518 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
519 bgmChanged = true;
520 });
521 break;
522 case "BGMStay":
523 AddEvent(delegate
524 {
525 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
526 });
527 break;
528 case "lastBGM":
529 AddEvent(delegate
530 {
531 EMono.Sound.StopBGM(p0f, playLastBGM: true);
532 });
533 break;
534 case "stopBGM":
535 AddEvent(delegate
536 {
537 LayerDrama.haltPlaylist = true;
538 EMono.Sound.StopBGM(p0f);
539 EMono.Sound.currentBGM = null;
540 });
541 break;
542 case "sound":
543 AddEvent(delegate
544 {
545 if (p3 != "")
546 {
547 SoundManager.current.MuteBGMFor(float.Parse(p3, CultureInfo.InvariantCulture));
548 }
549 EMono.Sound.Play(p2);
550 });
551 break;
552 case "haltPlaylist":
553 LayerDrama.haltPlaylist = true;
554 break;
555 case "keepBGM":
556 LayerDrama.keepBGM = true;
557 break;
558 case "alphaInOut":
559 AddEvent(delegate
560 {
561 DOTween.Kill(cg);
562 cg.alpha = 1f;
563 cg.DOFade(0f, p0f).SetDelay(0.1f);
564 }, p0f, halt: true);
565 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
566 AddEvent(delegate
567 {
568 DOTween.Kill(cg);
569 cg.alpha = 0f;
570 cg.DOFade(1f, p0f).SetDelay(0.1f);
571 }, p0f);
572 break;
573 case "alphaIn":
574 AddEvent(delegate
575 {
576 DOTween.Kill(cg);
577 cg.alpha = 0f;
578 cg.DOFade(1f, p0f).SetDelay(0.1f);
579 }, p0f);
580 break;
581 case "alphaOut":
582 AddEvent(delegate
583 {
584 DOTween.Kill(cg);
585 cg.alpha = 1f;
586 cg.DOFade(0f, p0f).SetDelay(0.1f);
587 }, p0f, halt: true);
588 break;
589 case "fadeIn":
590 AddEvent(delegate
591 {
592 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
593 cgCover.SetActive(enable: true);
594 cgCover.alpha = 1f;
595 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
596 }, p0f);
597 break;
598 case "fadeOut":
599 AddEvent(delegate
600 {
601 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
602 cgCover.SetActive(enable: true);
603 cgCover.alpha = 0f;
604 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
605 }, p0f, halt: true);
606 break;
607 case "fadeInOut":
608 AddEvent(delegate
609 {
610 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
611 cgCover.SetActive(enable: true);
612 cgCover.alpha = 0f;
613 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
614 }, p0f, halt: true);
615 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
616 AddEvent(delegate
617 {
618 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
619 cgCover.SetActive(enable: true);
620 cgCover.alpha = 1f;
621 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
622 }, p0f);
623 break;
624 case "hideUI":
625 AddEvent(delegate
626 {
627 EMono.ui.Hide(p0f);
628 });
629 break;
630 case "hideDialog":
631 AddEvent(delegate
632 {
633 dialog.SetActive(enable: false);
634 });
635 break;
636 case "fadeEnd":
637 if (p0f == 0f)
638 {
639 p0f = 1f;
640 }
641 AddEvent(delegate
642 {
643 imageCover.color = Color.black;
644 cgCover.SetActive(enable: true);
645 cgCover.alpha = 0f;
646 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
647 }, p0f, halt: true);
648 AddEvent(delegate
649 {
650 dialog.SetActive(enable: false);
651 imageBG.enabled = false;
652 });
653 AddEvent(delegate
654 {
655 DOTween.Kill(cg);
656 cg.alpha = 1f;
657 cg.DOFade(0f, p0f).SetDelay(0.1f);
658 }, p0f, halt: true);
659 break;
660 case "endroll":
662 break;
663 case "showSkip":
664 goSkip.SetActive(value: true);
665 break;
666 case "canCancel":
667 AddEvent(delegate
668 {
669 sequence.canCancel = bool.Parse(p2);
670 });
671 break;
672 case "wait":
673 AddEvent(new DramaEventWait(p0f));
674 break;
675 case "end":
677 break;
678 case "modAffinity":
679 AddEvent(delegate
680 {
681 int num = int.Parse(p2);
682 if (EMono.debug.enable)
683 {
684 num *= 10;
685 }
687 });
688 break;
689 case "acceptQuest":
691 {
692 break;
693 }
694 AddEvent(delegate
695 {
696 Quest quest = EMono.game.quests.globalList.Where((Quest a) => a.source.id == p2).First();
697 EMono.game.quests.globalList.Remove(quest);
698 EMono.game.quests.Start(quest);
699 });
700 break;
701 case "startQuest":
702 AddEvent(delegate
703 {
704 Quest quest2 = Quest.Create(p2);
705 if (!quest2.HasDLC)
706 {
707 Msg.Say("(Failed DLC check)");
708 }
709 else
710 {
711 EMono.game.quests.Start(quest2);
712 LayerDrama.currentQuest = quest2;
713 if (tg != null && tg.chara != null)
714 {
715 Debug.Log("Starting Quest:" + quest2?.ToString() + "/" + tg.chara.quest?.ToString() + "/" + (quest2 == tg.chara.quest));
716 }
717 }
718 });
719 break;
720 case "setQuestClient":
721 AddEvent(delegate
722 {
723 if (LayerDrama.currentQuest != null)
724 {
725 LayerDrama.currentQuest.SetClient(tg.chara, assignQuest: false);
726 }
727 });
728 break;
729 case "updateJournal":
730 AddEvent(delegate
731 {
733 });
734 break;
735 case "addKeyItem":
736 if (!LayerDrama.fromBook)
737 {
738 AddEvent(delegate
739 {
741 });
742 }
743 break;
744 case "drop":
745 if (!LayerDrama.fromBook)
746 {
747 AddEvent(delegate
748 {
749 Msg.Say("dropReward");
751 Thing t = ThingGen.Create(p2);
753 });
754 }
755 break;
756 case "completeQuest":
757 if (!LayerDrama.fromBook)
758 {
759 AddEvent(delegate
760 {
763 });
764 }
765 break;
766 case "nextPhase":
767 if (!LayerDrama.fromBook)
768 {
769 AddEvent(delegate
770 {
771 EMono.game.quests.Get(p2).NextPhase();
772 });
773 }
774 break;
775 case "changePhase":
776 if (!LayerDrama.fromBook)
777 {
778 AddEvent(delegate
779 {
780 EMono.game.quests.Get(p2).ChangePhase(p3.ToInt());
781 });
782 }
783 break;
784 case "addResource":
785 AddEvent(delegate
786 {
787 EMono.BranchOrHomeBranch.resources.Get(p2).Mod(p3.ToInt());
788 });
789 break;
790 case "shake":
791 AddEvent(delegate
792 {
794 });
795 break;
796 case "tutorial":
798 {
799 Tutorial.Play(p2);
800 });
801 break;
802 case "slap":
803 AddEvent(delegate
804 {
806 {
807 tg.chara.PlaySound("whip");
808 tg.chara.Say("slap", tg.chara, EMono.pc);
809 EMono.pc.PlayAnime(AnimeID.Shiver);
810 EMono.pc.DamageHP(5 + EClass.rndHalf(EMono.pc.MaxHP / 3), 919, 100, AttackSource.Condition);
812 });
813 });
814 break;
815 case "removeItem":
816 AddEvent(delegate
817 {
818 Thing thing = EMono.pc.things.Find(p2);
819 int num2 = p3.ToInt();
820 thing?.ModNum((num2 == 0) ? (-1) : (-num2));
821 });
822 break;
823 case "destroyItem":
824 AddEvent(delegate
825 {
826 EMono.pc.things.Find(p2).Destroy();
827 });
828 break;
829 case "focus":
830 AddEvent(delegate
831 {
833 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
834 {
835 pos = pos
836 };
837 });
838 break;
839 case "focusChara":
840 AddEvent(delegate
841 {
842 Point pos2 = EMono._map.FindChara(p2).pos.Copy();
844 {
845 pos = pos2,
846 speed = p3.IsEmpty("2").ToFloat()
847 };
848 });
849 break;
850 case "focusPC":
851 AddEvent(delegate
852 {
853 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
854 {
855 player = true,
856 speed = p2.IsEmpty("2").ToFloat()
857 };
858 });
859 break;
860 case "focusPos":
861 AddEvent(delegate
862 {
863 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
864 {
865 pos = new Point(p2.ToInt(), p3.ToInt()),
866 speed = p4.IsEmpty("2").ToFloat()
867 };
868 });
869 break;
870 case "unfocus":
871 AddEvent(delegate
872 {
873 EMono.scene.screenElin.focusOption = null;
874 });
875 break;
876 case "setAlwaysVisible":
877 AddEvent(delegate
878 {
879 LayerDrama.alwaysVisible = EMono._map.FindChara(p2);
880 });
881 break;
882 case "effect":
883 AddEvent(delegate
884 {
885 Point from = new Point(p[1].ToInt(), p[2].ToInt());
886 Effect.Get(p2).Play(from);
887 });
888 break;
889 case "effectEmbarkIn":
890 AddEvent(delegate
891 {
893 Util.Instantiate("UI/Layer/LayerEmbark/EmbarkActor_crystal");
894 });
895 break;
896 case "effectEmbarkOut":
897 AddEvent(delegate
898 {
899 UnityEngine.Object.FindObjectOfType<EmbarkActor>().Hide();
900 });
901 break;
902 case "propEnter":
903 AddEvent(delegate
904 {
905 DramaProp component = Util.Instantiate("Media/Drama/Prop/" + p2).GetComponent<DramaProp>();
906 component.name = p2;
907 if (p3.IsEmpty())
908 {
909 component.transform.position = EMono.scene.cam.transform.position;
910 }
911 else
912 {
913 Point point = new Point(p[1].ToInt(), p[2].ToInt());
914 component.transform.position = point.PositionCenter();
915 }
916 component.Enter();
917 });
918 break;
919 case "propLeave":
920 AddEvent(delegate
921 {
922 GameObject.Find(p2).GetComponent<DramaProp>().Leave();
923 });
924 break;
925 case "destroy":
926 AddEvent(delegate
927 {
928 Chara chara2 = EMono._map.FindChara(p2);
929 if (chara2 != null)
930 {
931 chara2.Destroy();
932 }
933 else
934 {
935 Debug.Log("Drama.destroy chara not found:" + p2);
936 }
937 });
938 break;
939 case "bout_win":
940 case "bout_lose":
941 AddEvent(delegate
942 {
944 {
946 if (action == "bout_win")
947 {
949 {
950 target = tg.chara
951 });
952 }
953 EMono.pc.MoveZone(zone);
954 });
955 });
956 break;
957 case "save":
958 AddEvent(delegate
959 {
960 EMono.game.Save(isAutoSave: false, silent: true);
961 });
962 break;
963 case "setHour":
964 AddEvent(delegate
965 {
966 EMono.world.date.hour = (int)p0f;
967 EMono.world.date.min = 0;
971 });
972 break;
973 case "%worship":
974 AddEvent(delegate
975 {
977 Tutorial.Reserve("faith");
978 });
979 break;
980 case "replace":
981 AddEvent(delegate
982 {
983 textReplace = text;
984 });
985 break;
986 default:
987 if (!flag)
988 {
989 break;
990 }
991 lastTalk = AddEvent(new DramaEventTalk(actor, delegate
992 {
993 if (!textReplace.IsEmpty())
994 {
995 text = textReplace;
996 textReplace = null;
997 }
998 if (tg != null && (actor == "tg" || actor.IsEmpty()))
999 {
1000 text = (enableTone ? tg.ApplyTone(text) : text);
1001 }
1002 return text;
1003 })) as DramaEventTalk;
1004 lastTalk.center = p2 == "center";
1005 break;
1006 case "new":
1007 case "saveBGM":
1008 case "checkAffinity":
1009 break;
1010 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
FocusOption focusOption
static void SetNormalRarity(bool fixedMat=false)
Chara Find(string id)
Definition: CardManager.cs:20
GlobalCharaList globalCharas
Definition: CardManager.cs:46
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6077
void RecalculateFOV()
Definition: Card.cs:6289
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6756
Point pos
Definition: Card.cs:59
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4012
void Destroy()
Definition: Card.cs:5015
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6096
void ModNum(int a, bool notify=true)
Definition: Card.cs:3464
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6729
void OnInsulted()
Definition: Chara.cs:8037
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7809
override int MaxHP
Definition: Chara.cs:706
void MoveZone(string alias)
Definition: Chara.cs:3304
bool enable
Definition: CoreDebug.cs:286
Dictionary< int, BGMData > dictBGM
Definition: CoreRef.cs:385
CoreRef refs
Definition: Core.cs:51
void AddChoice(DramaChoice choice)
DramaOutcome outcome
Definition: DramaManager.cs:29
string lastIF2
Definition: DramaManager.cs:59
string textReplace
Definition: DramaManager.cs:73
CanvasGroup cg
Definition: DramaManager.cs:15
CanvasGroup cgCover
Definition: DramaManager.cs:17
DialogDrama dialog
Definition: DramaManager.cs:31
DramaSequence Load()
bool CheckIF(string IF)
void SetDialog(string id="Default")
List< DramaChoice > _choices
Definition: DramaManager.cs:49
string lastIF
Definition: DramaManager.cs:57
GameObject goSkip
Definition: DramaManager.cs:35
void Enter()
Definition: DramaProp.cs:11
List< DramaEvent > events
void Play(string id)
void AddStep(string id)
Person person
Definition: DramaSetup.cs:19
Definition: EClass.cs:5
static int rndHalf(int a)
Definition: EClass.cs:87
static Core core
Definition: EMono.cs:5
static Zone _zone
Definition: EMono.cs:19
static FactionBranch BranchOrHomeBranch
Definition: EMono.cs:23
static Scene scene
Definition: EMono.cs:27
static UI ui
Definition: EMono.cs:15
static SoundManager Sound
Definition: EMono.cs:39
static CoreDebug debug
Definition: EMono.cs:45
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
HomeResourceManager resources
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1028
SpatialManager spatials
Definition: Game.cs:152
CardManager cards
Definition: Game.cs:155
BaseHomeResource Get(string id)
static string langCode
Definition: Lang.cs:28
static LayerDrama Instance
Definition: LayerDrama.cs:20
static Quest currentQuest
Definition: LayerDrama.cs:6
static Religion currentReligion
Definition: LayerDrama.cs:8
static Action refAction2
Definition: LayerDrama.cs:26
static Action refAction1
Definition: LayerDrama.cs:24
void ShowScreenLock(string id)
Definition: Layer.cs:207
Layer SetOnKill(Action action)
Definition: Layer.cs:579
void RevealAll(bool reveal=true)
Definition: Map.cs:905
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void SetChara(Chara c)
Definition: Person.cs:88
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2119
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:479
void Complete(Quest q)
Definition: QuestManager.cs:98
void UpdateJournal()
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
List< Quest > globalList
Definition: QuestManager.cs:14
virtual bool HasDLC
Definition: Quest.cs:147
virtual SourceQuest.Row source
Definition: Quest.cs:107
static Quest Create(string _id, string _idPerson=null, Chara c=null)
Definition: Quest.cs:241
void JoinFaith(Chara c, ConvertType type=ConvertType.Default)
Definition: Religion.cs:390
GameScreen screenElin
Definition: Scene.cs:93
void OnChangeHour()
Definition: Scene.cs:780
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25
Zone Find(string id)
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
static void Play(string idStep)
Definition: Tutorial.cs:7
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
Definition: Zone.cs:12
ZoneEventManager events
Definition: Zone.cs:40
void SetBGM(List< int > ids, bool refresh=true, float fadeDuration=0f)
Definition: Zone.cs:2923
ZoneInstance instance
Definition: Zone.cs:52
Card AddCard(Card t, Point point)
Definition: Zone.cs:1959

References _choices, EMono._map, EMono._zone, DramaSequence.AddActor(), Zone.AddCard(), DramaEventTalk.AddChoice(), AddCustomEvents(), AddEvent(), ZoneEventManager.AddPreEnter(), DramaSequence.AddStep(), bgmChanged, EMono.BranchOrHomeBranch, Game.cards, cg, cgCover, Person.chara, CheckIF(), Color, QuestManager.Complete(), Point.Copy(), EMono.core, countLine, Quest.Create(), ThingGen.Create(), LayerDrama.currentQuest, LayerDrama.currentReligion, customTalkTopics, Card.DamageHP(), EMono.debug, Debug, Card.Destroy(), dialog, CoreRef.dictBGM, dictLocalize, CoreDebug.enable, enableTone, DramaProp.Enter(), DramaSequence.events, Zone.events, ThingContainer.Find(), CardManager.GlobalCharaList.Find(), SpatialManager.Find(), Map.FindChara(), BaseGameScreen.focusOption, LayerDrama.fromBook, EMono.game, Effect.Get(), HomeResourceManager.Get(), QuestManager.Get(), Card.GetTalkText(), CardManager.globalCharas, QuestManager.globalList, goSkip, Person.hasChara, Quest.HasDLC, Hide(), idDefault, idDefaultPassed, if(), LayerDrama.Instance, Zone.instance, Lang.isBuiltin, item, Religion.JoinFaith(), Lang.langCode, lastIF, lastIF2, lastTalk, layer, Load(), Chara.MaxHP, Chara.ModAffinity(), Player.ModKeyItem(), Card.ModNum(), Chara.MoveZone(), Scene.OnChangeHour(), Chara.OnInsulted(), outcome, EMono.pc, DramaSetup.person, Effect.Play(), DramaSequence.Play(), Tutorial.Play(), Card.PlayAnime(), EMono.player, Card.PlaySound(), Card.pos, Game.quests, Card.RecalculateFOV(), LayerDrama.refAction1, LayerDrama.refAction2, BaseGameScreen.RefreshAll(), Core.refs, Tutorial.Reserve(), FactionBranch.resources, Map.RevealAll(), EClass.rndHalf(), Game.Save(), Msg.Say(), Card.Say(), EMono.scene, Scene.screenElin, sequence, Zone.SetBGM(), Person.SetChara(), SetDialog(), CardBlueprint.SetNormalRarity(), Layer.SetOnKill(), DramaSequence.setup, Shaker.ShakeCam(), Layer.ShowScreenLock(), EMono.Sound, Quest.source, Game.spatials, QuestManager.Start(), DramaSequence.steps, textReplace, tg, Card.things, EMono.ui, ZoneInstance.uidZone, QuestManager.UpdateJournal(), and Util.

Referenced by Load().

◆ Play()

DramaSequence DramaManager.Play ( DramaSetup  setup)
inline

Definition at line 87 of file DramaManager.cs.

88 {
89 this.setup = setup;
90 cgCover.SetActive(enable: false);
91 endroll.SetActive(enable: false);
92 tg = setup.person;
93 SetDialog();
95 {
96 setup = setup,
97 manager = this,
98 id = setup.sheet
99 };
100 Load();
101 sequence.lastStep = (sequence.lastlastStep = setup.step);
102 if (!setup.forceJump.IsEmpty())
103 {
105 }
106 else
107 {
108 sequence.Play();
109 }
110 return sequence;
111 }
Transform endroll
Definition: DramaManager.cs:23
string forceJump
Definition: DramaSetup.cs:13

References cgCover, endroll, DramaSetup.forceJump, Load(), DramaSetup.person, DramaSequence.Play(), sequence, SetDialog(), setup, DramaSetup.step, and tg.

Referenced by LayerDrama.Activate(), and LayerDrama.ActivateNerun().

◆ SetDialog()

void DramaManager.SetDialog ( string  id = "Default")
inline

Definition at line 1045 of file DramaManager.cs.

1051 {
1052 DialogDrama[] componentsInChildren = GetComponentsInChildren<DialogDrama>(includeInactive: true);
1053 foreach (DialogDrama dialogDrama in componentsInChildren)
1054 {
1055 if ((bool)dialogDrama.portrait)
1056 {
1057 dialogDrama.portrait.imageFull.SetActive(enable: false);
1058 }
1059 dialogDrama.SetActive(enable: false);
1060 if (dialogDrama.name == "Dialog" + id)
Portrait portrait
Definition: DialogDrama.cs:41
Image imageFull
Definition: Portrait.cs:30

Referenced by ParseLine(), and Play().

◆ Show()

void DramaManager.Show ( )
inline

Definition at line 1264 of file DramaManager.cs.

1270 {

◆ Update()

void DramaManager.Update ( )
inlineprivate

Definition at line 79 of file DramaManager.cs.

80 {
81 if (sequence != null)
82 {
84 }
85 }

References DramaSequence.OnUpdate(), and sequence.

Member Data Documentation

◆ _choices

List<DramaChoice> DramaManager._choices = new List<DramaChoice>()

Definition at line 49 of file DramaManager.cs.

Referenced by DramaCustomSequence.Choice2(), and ParseLine().

◆ actorPos

Transform DramaManager.actorPos

Definition at line 21 of file DramaManager.cs.

Referenced by DramaSequence.AddActor(), and Load().

◆ bgmChanged

bool DramaManager.bgmChanged

Definition at line 45 of file DramaManager.cs.

Referenced by ParseLine().

◆ cg

CanvasGroup DramaManager.cg

Definition at line 15 of file DramaManager.cs.

Referenced by ParseLine().

◆ cgCover

CanvasGroup DramaManager.cgCover

Definition at line 17 of file DramaManager.cs.

Referenced by ParseLine(), and Play().

◆ countLine

int DramaManager.countLine

Definition at line 69 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ creditSpeed

float DramaManager.creditSpeed

Definition at line 55 of file DramaManager.cs.

◆ customEvents

List<DramaEvent> DramaManager.customEvents = new List<DramaEvent>()
private

Definition at line 47 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customEventsAdded

bool DramaManager.customEventsAdded

Definition at line 65 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customTalkTopics

Dictionary<string, string> DramaManager.customTalkTopics = new Dictionary<string, string>()

Definition at line 51 of file DramaManager.cs.

Referenced by DramaCustomSequence.GetText(), Load(), and ParseLine().

◆ dialog

DialogDrama DramaManager.dialog

Definition at line 31 of file DramaManager.cs.

Referenced by ParseLine().

◆ dictCache

Dictionary<string, ExcelData> DramaManager.dictCache = new Dictionary<string, ExcelData>()
static

Definition at line 75 of file DramaManager.cs.

Referenced by Load().

◆ dictLocalize

Dictionary<string, string> DramaManager.dictLocalize = new Dictionary<string, string>()

Definition at line 53 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ enableTone

bool DramaManager.enableTone

Definition at line 63 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ endroll

Transform DramaManager.endroll

Definition at line 23 of file DramaManager.cs.

Referenced by DramaEventEndRoll.Play(), and Play().

◆ fonts

Font [] DramaManager.fonts

Definition at line 41 of file DramaManager.cs.

◆ goSkip

GameObject DramaManager.goSkip

Definition at line 35 of file DramaManager.cs.

Referenced by ParseLine().

◆ idDefault

string DramaManager.idDefault
private

Definition at line 71 of file DramaManager.cs.

Referenced by AddCustomEvents(), Load(), and ParseLine().

◆ idDefaultPassed

bool DramaManager.idDefaultPassed

Definition at line 67 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ imageBG

Image DramaManager.imageBG

Definition at line 37 of file DramaManager.cs.

◆ imageCover

Image DramaManager.imageCover

Definition at line 39 of file DramaManager.cs.

◆ lastIF

string DramaManager.lastIF
private

Definition at line 57 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastIF2

string DramaManager.lastIF2
private

Definition at line 59 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastTalk

◆ layer

LayerDrama DramaManager.layer

Definition at line 13 of file DramaManager.cs.

Referenced by ParseLine().

◆ listCredit

UIDynamicList DramaManager.listCredit

Definition at line 19 of file DramaManager.cs.

◆ moldActor

DramaActor DramaManager.moldActor

Definition at line 25 of file DramaManager.cs.

Referenced by DramaSequence.AddActor(), and Load().

◆ outcome

DramaOutcome DramaManager.outcome

Definition at line 29 of file DramaManager.cs.

Referenced by ParseLine().

◆ sequence

DramaSequence DramaManager.sequence

Definition at line 27 of file DramaManager.cs.

Referenced by AddCustomEvents(), LayerDrama.LateUpdate(), Load(), ParseLine(), Play(), and Update().

◆ setup

DramaSetup DramaManager.setup

Definition at line 33 of file DramaManager.cs.

Referenced by AddCustomEvents(), Load(), and Play().

◆ textReplace

string DramaManager.textReplace
private

Definition at line 73 of file DramaManager.cs.

Referenced by ParseLine().

◆ TG

Chara DramaManager.TG
static

Definition at line 11 of file DramaManager.cs.

Referenced by AddCustomEvents(), and GameLang.ConvertDrama().

◆ tg

Person DramaManager.tg

Definition at line 43 of file DramaManager.cs.

Referenced by AddCustomEvents(), Load(), ParseLine(), and Play().

Property Documentation

◆ tgActor

DramaActor DramaManager.tgActor
get

Definition at line 77 of file DramaManager.cs.


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