Elin Modding Docs Doc
Loading...
Searching...
No Matches
Tutorial.cs
1using System;
2
3// Token: 0x02000109 RID: 265
4public class Tutorial : EClass
5{
6 // Token: 0x060006F8 RID: 1784 RVA: 0x0002A024 File Offset: 0x00028224
7 public static void Play(string idStep)
8 {
9 Tutorial.<>c__DisplayClass1_0 CS$<>8__locals1 = new Tutorial.<>c__DisplayClass1_0();
10 CS$<>8__locals1.idStep = idStep;
11 bool flag = Tutorial.debugSkip || !EClass.core.config.game.tutorial;
12 CS$<>8__locals1.id = EClass.player.flags.GetStoryRowID("_tutorial", CS$<>8__locals1.idStep);
13 EClass.debug.Log(string.Concat(new string[]
14 {
15 CS$<>8__locals1.idStep,
16 "/",
17 CS$<>8__locals1.id.ToString(),
18 "/",
19 flag.ToString(),
20 "/",
21 Tutorial.debugSkip.ToString(),
22 "/",
23 EClass.player.flags.playedStories.Contains(CS$<>8__locals1.id).ToString()
24 }));
25 if (EClass.player.flags.playedStories.Contains(CS$<>8__locals1.id))
26 {
27 return;
28 }
29 if (!flag)
30 {
31 EClass.core.actionsNextFrame.Add(delegate
32 {
33 EClass.player.flags.PlayStory("_tutorial", CS$<>8__locals1.id, false);
34 if (LayerDrama.Instance)
35 {
36 Layer instance = LayerDrama.Instance;
37 Action onKill;
38 if ((onKill = CS$<>8__locals1.<>9__2) == null)
39 {
40 onKill = (CS$<>8__locals1.<>9__2 = delegate()
41 {
42 base.<Play>g__AfterPlay|0();
43 });
44 }
45 instance.SetOnKill(onKill);
46 }
47 });
48 return;
49 }
50 EClass.player.flags.playedStories.Add(CS$<>8__locals1.id);
51 CS$<>8__locals1.<Play>g__AfterPlay|0();
52 }
53
54 // Token: 0x060006F9 RID: 1785 RVA: 0x0002A168 File Offset: 0x00028368
55 public static void Remove(string idStep)
56 {
57 int storyRowID = EClass.player.flags.GetStoryRowID("_tutorial", idStep);
58 EClass.player.flags.playedStories.Remove(storyRowID);
59 }
60
61 // Token: 0x060006FA RID: 1786 RVA: 0x0002A1A4 File Offset: 0x000283A4
62 public static void Reserve(string idStep, Action onBeforePlay = null)
63 {
64 if (EClass.player.flags.reservedTutorial.Contains(idStep))
65 {
66 return;
67 }
68 int storyRowID = EClass.player.flags.GetStoryRowID("_tutorial", idStep);
69 if (EClass.player.flags.playedStories.Contains(storyRowID))
70 {
71 return;
72 }
73 if (onBeforePlay != null)
74 {
75 onBeforePlay();
76 }
77 EClass.player.flags.reservedTutorial.Add(idStep);
78 }
79
80 // Token: 0x060006FB RID: 1787 RVA: 0x0002A218 File Offset: 0x00028418
81 public static void TryPlayReserve()
82 {
83 if (EClass.ui.IsActive)
84 {
85 return;
86 }
87 if (EClass.player.flags.reservedTutorial.Count == 0)
88 {
89 return;
90 }
91 if (LayerDrama.Instance)
92 {
93 return;
94 }
95 Tutorial.Play(EClass.player.flags.reservedTutorial[0]);
96 EClass.player.flags.reservedTutorial.RemoveAt(0);
97 }
98
99 // Token: 0x04000730 RID: 1840
100 public static bool debugSkip;
101}