Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
ScreenFlash.cs
Go to the documentation of this file.
1
using
DG.Tweening;
2
using
UnityEngine;
3
4
public
class
ScreenFlash
: ScriptableObject
5
{
6
private
static
Tween
tween
;
7
8
public
static
Color
currentColor
;
9
10
public
static
Color
clearColor
=
new
Color
(0f, 0f, 0f, 0f);
11
12
public
Color
color
;
13
14
public
AnimationCurve
ease
;
15
16
public
float
duration
;
17
18
public
static
void
Reset
()
19
{
20
TweenUtil.KillTween(ref
tween
);
21
currentColor
=
clearColor
;
22
}
23
24
public
static
void
Play
(
string
id
,
float
mtp = 1f)
25
{
26
ResourceCache
.Load<
ScreenFlash
>(
"Media/Effect/ScreenEffect/Flash/"
+ id).
Play
(mtp);
27
}
28
29
public
void
Play
(
float
mtp = 1f)
30
{
31
TweenUtil.KillTween(ref
tween
);
32
tween
= DOTween.To(() =>
currentColor
, delegate(
Color
x)
33
{
34
currentColor
= x;
35
},
color
* mtp,
duration
).SetEase(
ease
).OnComplete(delegate
36
{
37
Reset
();
38
});
39
}
40
}
FOWType.Color
@ Color
ResourceCache
Definition:
ResourceCache.cs:20
ScreenFlash
Definition:
ScreenFlash.cs:5
ScreenFlash.Reset
static void Reset()
Definition:
ScreenFlash.cs:18
ScreenFlash.tween
static Tween tween
Definition:
ScreenFlash.cs:6
ScreenFlash.ease
AnimationCurve ease
Definition:
ScreenFlash.cs:14
ScreenFlash.clearColor
static Color clearColor
Definition:
ScreenFlash.cs:10
ScreenFlash.currentColor
static Color currentColor
Definition:
ScreenFlash.cs:8
ScreenFlash.Play
static void Play(string id, float mtp=1f)
Definition:
ScreenFlash.cs:24
ScreenFlash.color
Color color
Definition:
ScreenFlash.cs:12
ScreenFlash.duration
float duration
Definition:
ScreenFlash.cs:16
ScreenFlash.Play
void Play(float mtp=1f)
Definition:
ScreenFlash.cs:29
Elin
ScreenFlash.cs
Generated by
1.9.6