Elin Modding Docs Doc
Loading...
Searching...
No Matches
GameScreenElona.cs
1using System;
2using CreativeSpore.SuperTilemapEditor;
3using UnityEngine;
4
5// Token: 0x02000166 RID: 358
7{
8 // Token: 0x170002AE RID: 686
9 // (get) Token: 0x06000A9C RID: 2716 RVA: 0x000418F9 File Offset: 0x0003FAF9
10 public override float SkyRate
11 {
12 get
13 {
14 return this.skyRate;
15 }
16 }
17
18 // Token: 0x170002AF RID: 687
19 // (get) Token: 0x06000A9D RID: 2717 RVA: 0x00041901 File Offset: 0x0003FB01
20 public override float TargetZoom
21 {
22 get
23 {
24 return this.zoom + 0.01f * (float)EMono.game.config.regionZoom - 1f;
25 }
26 }
27
28 // Token: 0x06000A9E RID: 2718 RVA: 0x00041928 File Offset: 0x0003FB28
29 public override void OnActivate()
30 {
31 this.actor.transMap.SetActive(true);
32 this.actor.selector.hasTargetChanged = true;
33 EMono.scene.skyBG.SetActive(false);
34 EMono.scene.cam.clearFlags = CameraClearFlags.Color;
35 Tutorial.Play("region");
36 this.actor.OnActivate();
37 }
38
39 // Token: 0x06000A9F RID: 2719 RVA: 0x0004198C File Offset: 0x0003FB8C
40 public override void OnDeactivate()
41 {
42 this.actor.OnDeactivate();
43 }
44
45 // Token: 0x06000AA0 RID: 2720 RVA: 0x00041999 File Offset: 0x0003FB99
46 public override void OnChangeHour()
47 {
48 this.actor.OnChangeHour();
49 }
50
51 // Token: 0x06000AA1 RID: 2721 RVA: 0x000419A8 File Offset: 0x0003FBA8
52 public override void SetUnitSize()
53 {
54 this.tileAlign = new Vector2(this.tileSize.x * 0.01f, this.tileSize.y * 0.01f);
55 this.tileWorldSize = new Vector2(this.tileSize.x * 0.01f, this.tileSize.y * 0.01f);
56 float x = this.tileSize.x;
57 float num = 100f / x;
58 float num2 = num * 100f;
59 float num3 = num * 100f;
60 this.tileViewSize = new Vector2(num2 * 0.01f, num3 * 0.01f);
61 }
62
63 // Token: 0x06000AA2 RID: 2722 RVA: 0x00041A4C File Offset: 0x0003FC4C
64 public unsafe override void RefreshPosition()
65 {
66 STETilemap fogmap = this.actor.elomap.fogmap;
67 this.actor.transMap.position = new Vector3((float)(-(float)fogmap.MinGridX) * this.tileAlign.x + this.actorPos.x, (float)(-(float)fogmap.MinGridY) * this.tileAlign.y + this.actorPos.y, this.actorPos.z);
68 if (base.fixFocus && EMono.pc.currentZone == EMono._zone)
69 {
70 float z = this.position.z;
71 this.targetZoom = this.TargetZoom;
72 Vector3 vector = (EMono.pc.isSynced ? EMono.pc.renderer.position : (*EMono.pc.pos.PositionTopdown())) + this.focusFix;
73 if (this.instantFocus)
74 {
75 this.position = vector;
76 }
77 else
78 {
79 this.position = Vector3.Lerp(this.position, vector, this.focusSpeed * Core.delta);
80 }
81 this.position.z = z;
82 this.pcOrbit.transform.position = EMono.pc.renderer.position;
83 }
84 else
85 {
86 if (ActionMode.Adv.IsActive)
87 {
88 this.targetZoom = 0.01f * (float)EMono.game.config.defaultZoom;
89 }
90 this.pushBack = Vector3.zero;
91 int scrollX = this.scrollX;
92 int scrollY = this.scrollY;
93 if ((float)scrollX <= this.mapLimit.x)
94 {
95 this.pushBack.x = this.mapLimit.x - (float)scrollX;
96 }
97 if ((float)scrollY <= this.mapLimit.y)
98 {
99 this.pushBack.y = this.mapLimit.y - (float)scrollY;
100 }
101 if ((float)scrollX >= (float)EMono._map.Size + this.mapLimit.width - (float)(this.width / 2))
102 {
103 this.pushBack.x = (float)EMono._map.Size + this.mapLimit.width - (float)(this.width / 2) - (float)scrollX;
104 }
105 if ((float)scrollY >= (float)EMono._map.Size + this.mapLimit.height - (float)(this.height / 2))
106 {
107 this.pushBack.y = (float)EMono._map.Size + this.mapLimit.height - (float)(this.height / 2) - (float)scrollY;
108 }
109 this.position += this.pushBack * Core.delta * this.pushbackSpeed;
110 }
111 this.scrollX = Mathf.FloorToInt(this.position.x / this.tileWorldSize.x) - this.width / 2 + (int)this.paddingOffset.x;
112 this.scrollY = Mathf.FloorToInt(this.position.y / this.tileWorldSize.y) - this.height / 4 + (int)this.paddingOffset.y;
113 if (this.lastPos.x != (float)this.scrollX || this.lastPos.y != (float)this.scrollY)
114 {
115 this.lastPos.x = (float)this.scrollX;
116 this.lastPos.y = (float)this.scrollY;
117 }
118 this.camPos.x = this.position.x;
119 this.camPos.y = this.position.y;
120 base.SnapScreen(ref this.camPos, this.Zoom);
121 this.camPos.z = -500f;
122 EMono.scene.cam.transform.localPosition = this.camPos;
123 this.camPos.z = 0f;
124 EMono.scene.transAudio.position = this.camPos;
125 if (WidgetMinimap.Instance)
126 {
127 WidgetMinimap.Instance.OnUpdate();
128 }
129 this.RefreshWeather();
130 }
131
132 // Token: 0x06000AA3 RID: 2723 RVA: 0x00041E6C File Offset: 0x0004006C
133 public override void RefreshWeather()
134 {
135 EMono.world.weather.RefreshWeather();
136 Point pos = EMono.pc.pos;
137 Weather weather = EMono.world.weather;
138 Weather.Condition currentCondition = weather.CurrentCondition;
139 bool isRaining = weather.IsRaining;
140 bool isEther = weather.IsEther;
141 bool flag = currentCondition == Weather.Condition.Snow;
142 EMono.scene.filterRain.enabled = (isRaining && !flag && EMono.core.config.graphic.enhanceRain);
143 EMono.scene.filterRain.Fade = ((currentCondition == Weather.Condition.RainHeavy) ? 0.4f : 0.3f);
144 EMono.scene.rain.enableEmission = (isRaining && !flag);
145 ParticleSystem.EmissionModule emission = EMono.scene.rain.emission;
146 emission.rateOverTime = (float)((currentCondition == Weather.Condition.RainHeavy) ? 700 : 200);
147 EMono.scene.snow.enableEmission = flag;
148 emission = EMono.scene.snow.emission;
149 emission.rateOverTime = (float)((currentCondition == Weather.Condition.SnowHeavy) ? 120 : 35);
150 EMono.scene.ether.enableEmission = isEther;
151 EMono.scene.snow.SetActive(true);
152 EMono.scene.rain.SetActive(true);
153 EMono.scene.ether.SetActive(true);
154 EMono.scene.blossom.SetActive(false);
155 EMono.scene.godray.SetActive(false);
156 EMono.scene.godrayDust.SetActive(false);
157 EMono.scene.sfxRain._Volume += Core.delta * ((isRaining && !flag) ? 0.5f : -0.5f);
158 EMono.scene.sfxRain.SetVolume(EMono.scene.sfxRain._Volume);
159 EMono.scene.sfxWind.SetVolume(1f);
160 EMono.scene.sfxSea.SetVolume(Mathf.Lerp(0f, 1f, -0.05f * (float)(pos.x - 20)));
161 EMono.scene.rain.main.prewarm = (EMono.scene.snow.main.prewarm = (EMono.scene.ether.main.prewarm = false));
162 ParticleSystem[] array = EMono.scene.blossoms;
163 for (int i = 0; i < array.Length; i++)
164 {
165 array[i].main.prewarm = false;
166 }
167 bool enableEmission = currentCondition == Weather.Condition.SnowHeavy && EMono.core.config.graphic.blizzard;
168 array = EMono.scene.blizzards;
169 for (int i = 0; i < array.Length; i++)
170 {
171 array[i].enableEmission = enableEmission;
172 }
173 EMono.scene.transBlizzard.localScale = new Vector3(2f, 2f, 2f);
174 EMono.scene.camSupport.grading.profile.fog = EMono.setting.render.fogs[EMono._map.config.fog];
175 float sceneBrightness = (!EMono._map.IsIndoor && EMono.world.weather.IsRaining) ? ((currentCondition == Weather.Condition.RainHeavy) ? -0.06f : -0.03f) : 0f;
176 base.camSupport.grading.sceneBrightness = sceneBrightness;
177 }
178
179 // Token: 0x04000981 RID: 2433
180 public EloMapActor actor;
181
182 // Token: 0x04000982 RID: 2434
183 public float skyRate;
184
185 // Token: 0x04000983 RID: 2435
186 public float zoom;
187
188 // Token: 0x04000984 RID: 2436
189 public Vector3 actorPos;
190}
Definition EMono.cs:6
Definition Point.cs:11