Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerCover.cs
Go to the documentation of this file.
1using System;
2
3public class LayerCover : ELayer
4{
5 public Func<float, bool> funcEnd;
6
7 public void SetDuration(float duration, Action onKill)
8 {
9 TweenUtil.Tween(duration, null, delegate
10 {
11 ELayer.ui.RemoveLayer(this);
12 onKill();
13 });
14 }
15
16 public void SetCondition(Func<float, bool> func)
17 {
18 funcEnd = func;
19 }
20
21 public override void OnUpdateInput()
22 {
23 base.OnUpdateInput();
24 if (funcEnd != null && funcEnd(Core.delta))
25 {
26 ELayer.ui.RemoveLayer(this);
27 }
28 }
29}
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21
void SetCondition(Func< float, bool > func)
Definition: LayerCover.cs:16
override void OnUpdateInput()
Definition: LayerCover.cs:21
void SetDuration(float duration, Action onKill)
Definition: LayerCover.cs:7
Func< float, bool > funcEnd
Definition: LayerCover.cs:5
UnityEvent onKill
Definition: Layer.cs:86