Elin Modding Docs Doc
Loading...
Searching...
No Matches
DramaEventMethod.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000110 RID: 272
6{
7 // Token: 0x06000719 RID: 1817 RVA: 0x0002ADA7 File Offset: 0x00028FA7
8 public DramaEventMethod(Action _action, float _duration = 0f, bool _halt = false)
9 {
10 this.action = _action;
11 this.time = _duration;
12 this.halt = _halt;
13 }
14
15 // Token: 0x0600071A RID: 1818 RVA: 0x0002ADC4 File Offset: 0x00028FC4
16 public override bool Play()
17 {
18 if (this.progress == 0)
19 {
20 if (this.hideDialog)
21 {
22 this.sequence.dialog.SetActive(false);
23 }
24 if (this.action != null)
25 {
26 this.action();
27 }
28 if (this.time > 0f && !Input.GetKey(KeyCode.LeftControl))
29 {
30 TweenUtil.Tween(this.time, null, delegate()
31 {
32 this.progress = -1;
33 });
34 this.progress++;
35 }
36 else
37 {
38 this.progress = -1;
39 }
40 }
41 if (EClass.ui.GetTopLayer() != base.layer)
42 {
43 if (this.sequence.dialog)
44 {
45 this.sequence.dialog.SetActive(false);
46 }
47 return false;
48 }
49 if (this.progress == -1 || !this.halt || (this.endFunc != null && this.endFunc()))
50 {
51 if (this.jumpFunc != null)
52 {
53 string text = this.jumpFunc();
54 if (!text.IsEmpty())
55 {
56 this.sequence.Play(text);
57 return false;
58 }
59 }
60 return true;
61 }
62 return false;
63 }
64
65 // Token: 0x04000763 RID: 1891
66 public Action action;
67
68 // Token: 0x04000764 RID: 1892
69 public Func<bool> endFunc;
70
71 // Token: 0x04000765 RID: 1893
72 public Func<string> jumpFunc;
73
74 // Token: 0x04000766 RID: 1894
75 public bool halt;
76
77 // Token: 0x04000767 RID: 1895
78 public bool hideDialog;
79}