Elin Modding Docs Doc
Loading...
Searching...
No Matches
EmbarkActor.cs
1using System;
2using DG.Tweening;
3using DG.Tweening.Core;
4using DG.Tweening.Plugins.Options;
5using UnityEngine;
6using UnityStandardAssets.ImageEffects;
7
8// Token: 0x02000540 RID: 1344
9public class EmbarkActor : EMono
10{
11 // Token: 0x06002477 RID: 9335 RVA: 0x000CDA60 File Offset: 0x000CBC60
12 private void Update()
13 {
14 if (this.isDestroying)
15 {
16 return;
17 }
18 if (!this.crystal)
19 {
20 this.show = !EMono.core.IsGameStarted;
21 }
22 if (this.show)
23 {
24 this.sr.DOFade(this.targetFade, this.fadeTime);
25 this.skyLevel += Core.delta * this.speedSky;
26 if (this.skyLevel > this.targetFade)
27 {
28 this.skyLevel = this.targetFade;
29 }
30 this.anim.DOPlay();
31 }
32 else
33 {
34 if (!this.crystal)
35 {
36 this.sr.DOFade(0f, this.fadeTime);
37 }
38 this.skyLevel -= Core.delta * this.speedSky;
39 if (this.skyLevel < 0f)
40 {
41 this.skyLevel = 0f;
42 }
43 this.anim.DOPause();
44 }
45 this.grading.material.SetFloat("_SkyLevel", this.skyLevel);
46 this.grading.material.SetFloat("_ViewHeight", 20f);
47 this.grading.material.SetVector("_ScreenPos", Vector3.zero);
48 this.grading.material.SetVector("_Position", this.cam.transform.position * this.speed);
49 this.grading.material.SetVector("_Offset", Vector3.zero);
50 this.grading.SetGrading();
51 }
52
53 // Token: 0x06002478 RID: 9336 RVA: 0x000CDC00 File Offset: 0x000CBE00
54 public void Hide()
55 {
56 this.isDestroying = true;
57 this.show = false;
58 this.ps.emission.enabled = false;
59 DOTween.To(() => this.tiltShift.blurArea, delegate(float x)
60 {
61 this.tiltShift.blurArea = x;
62 }, 0f, this.fadeTime);
63 this.sr2.DOFade(0f, this.fadeTime - 0.1f);
64 this.sr.DOFade(0f, this.fadeTime).OnComplete(delegate
65 {
66 if (this.crystal)
67 {
68 UnityEngine.Object.Destroy(base.gameObject);
69 }
70 });
71 }
72
73 // Token: 0x040013E2 RID: 5090
74 public Camera cam;
75
76 // Token: 0x040013E3 RID: 5091
77 public TiltShift tiltShift;
78
79 // Token: 0x040013E4 RID: 5092
80 public ScreenGrading grading;
81
82 // Token: 0x040013E5 RID: 5093
83 public SpriteRenderer sr;
84
85 // Token: 0x040013E6 RID: 5094
86 public SpriteRenderer sr2;
87
88 // Token: 0x040013E7 RID: 5095
89 public ParticleSystem ps;
90
91 // Token: 0x040013E8 RID: 5096
92 public float speed;
93
94 // Token: 0x040013E9 RID: 5097
95 public float speedSky;
96
97 // Token: 0x040013EA RID: 5098
98 public float skyLevel = 1f;
99
100 // Token: 0x040013EB RID: 5099
101 public float fadeTime;
102
103 // Token: 0x040013EC RID: 5100
104 public float targetFade = 1f;
105
106 // Token: 0x040013ED RID: 5101
107 public bool show;
108
109 // Token: 0x040013EE RID: 5102
110 public bool crystal;
111
112 // Token: 0x040013EF RID: 5103
113 public bool isDestroying;
114
115 // Token: 0x040013F0 RID: 5104
116 public DOTweenAnimation anim;
117}
Definition EMono.cs:6