Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
DramaEventMethod.cs
Go to the documentation of this file.
1
using
System;
2
using
UnityEngine;
3
4
public
class
DramaEventMethod
:
DramaEvent
5
{
6
public
Action
action
;
7
8
public
Func<bool>
endFunc
;
9
10
public
Func<string>
jumpFunc
;
11
12
public
bool
halt
;
13
14
public
bool
hideDialog
;
15
16
public
DramaEventMethod
(Action _action,
float
_duration = 0f,
bool
_halt =
false
)
17
{
18
action
= _action;
19
time
= _duration;
20
halt
= _halt;
21
}
22
23
public
override
bool
Play
()
24
{
25
if
(
progress
== 0)
26
{
27
if
(
hideDialog
)
28
{
29
sequence
.
dialog
.SetActive(enable:
false
);
30
}
31
if
(
action
!=
null
)
32
{
33
action
();
34
}
35
if
(
time
> 0f && !Input.GetKey(KeyCode.LeftControl))
36
{
37
TweenUtil.Tween(
time
,
null
, delegate
38
{
39
progress
= -1;
40
});
41
progress
++;
42
}
43
else
44
{
45
progress
= -1;
46
}
47
}
48
if
(
EClass
.
ui
.GetTopLayer() != base.layer)
49
{
50
if
((
bool
)
sequence
.
dialog
)
51
{
52
sequence
.
dialog
.SetActive(enable:
false
);
53
}
54
return
false
;
55
}
56
if
(
progress
== -1 || !
halt
|| (
endFunc
!=
null
&&
endFunc
()))
57
{
58
if
(
jumpFunc
!=
null
)
59
{
60
string
text =
jumpFunc
();
61
if
(!text.IsEmpty())
62
{
63
sequence
.
Play
(text);
64
return
false
;
65
}
66
}
67
return
true
;
68
}
69
return
false
;
70
}
71
}
DramaEventMethod
Definition:
DramaEventMethod.cs:5
DramaEventMethod.Play
override bool Play()
Definition:
DramaEventMethod.cs:23
DramaEventMethod.hideDialog
bool hideDialog
Definition:
DramaEventMethod.cs:14
DramaEventMethod.action
Action action
Definition:
DramaEventMethod.cs:6
DramaEventMethod.DramaEventMethod
DramaEventMethod(Action _action, float _duration=0f, bool _halt=false)
Definition:
DramaEventMethod.cs:16
DramaEventMethod.halt
bool halt
Definition:
DramaEventMethod.cs:12
DramaEventMethod.endFunc
Func< bool > endFunc
Definition:
DramaEventMethod.cs:8
DramaEventMethod.jumpFunc
Func< string > jumpFunc
Definition:
DramaEventMethod.cs:10
DramaEvent
Definition:
DramaEvent.cs:2
DramaEvent.sequence
DramaSequence sequence
Definition:
DramaEvent.cs:15
DramaEvent.time
float time
Definition:
DramaEvent.cs:11
DramaEvent.progress
int progress
Definition:
DramaEvent.cs:3
DramaSequence.Play
void Play(string id)
Definition:
DramaSequence.cs:124
DramaSequence.dialog
DialogDrama dialog
Definition:
DramaSequence.cs:47
EClass
Definition:
EClass.cs:5
EClass.ui
static UI ui
Definition:
EClass.cs:16
Elin
DramaEventMethod.cs
Generated by
1.9.6