14 return actionMode !=
null && actionMode.FixFocus;
20 public virtual float TargetZoom
24 return EMono.scene.actionMode.TargetZoom;
34 return EMono.scene.camSupport;
40 protected Transform transFocus
44 return EMono.scene.transFocus;
50 public virtual float SkyRate
54 return Mathf.Clamp((1.2f - this.Zoom) * 2f - (
EMono._zone.IsSnowCovered ? 0.38f : 0f), 0f, 2f);
60 public virtual float ViewHeight
64 return this.SkyRate * 10f + 5f;
70 public virtual bool IsGameScreen
80 public virtual bool IsLocalMap
89 public void Activate()
91 if (
EMono.core.screen ==
this)
95 if (
EMono.core.screen !=
null)
97 EMono.core.screen.Deactivate();
100 EMono.core.screen =
this;
101 Point._screen =
this;
102 base.gameObject.SetActive(
true);
103 EMono.scene.flock.SetActive(this.IsLocalMap);
104 EMono.scene.fireflyNight.SetActive(this.IsLocalMap);
105 EMono.scene.firefly.SetActive(this.IsLocalMap);
106 EMono.scene.star.SetActive(this.IsLocalMap);
107 EMono.scene.sfxRain.SetActive(this.IsGameScreen);
108 EMono.scene.sfxSea.SetActive(this.IsGameScreen);
109 EMono.scene.sfxWind.SetActive(this.IsGameScreen);
110 EMono.scene.sfxFire.SetActive(this.IsGameScreen);
112 EMono.scene.rain.main.prewarm = (EMono.scene.snow.main.prewarm = (EMono.scene.ether.main.prewarm =
true));
113 ParticleSystem[] blossoms =
EMono.scene.blossoms;
114 for (
int i = 0; i < blossoms.Length; i++)
116 blossoms[i].main.prewarm =
true;
118 if (this.overlayShadow)
120 this.overlayShadow.SetActive(
EMono.scene.profile.matOverlay);
121 this.overlayShadow.sharedMaterial =
EMono.scene.profile.matOverlay;
123 EMono.scene.camSupport.grading.material =
EMono.scene.profile.matGrading;
124 if (this.IsGameScreen)
126 EMono.scene.OnChangeHour();
127 EMono.scene.ApplyZoneConfig();
129 this.tileMap.OnActivate(
this);
133 if (
EMono.core.config !=
null)
135 EMono.core.config.RefreshUIBrightness();
140 public virtual void OnActivate()
145 public void Deactivate()
148 base.gameObject.SetActive(
false);
149 EMono.core.screen =
null;
153 public virtual void OnDeactivate()
158 public virtual void SetUnitSize()
163 public virtual void OnEndPlayerTurn()
168 public unsafe
void Draw()
170 if (!this.IsGameScreen)
174 if (this.Zoom != this.targetZoom)
176 bool flag = EMono.scene.actionMode ==
ActionMode.Bird;
178 float num = camera.zoomSpeed * (flag ? 0.05f : (camera.linearZoom ? 2f : 1f)) * Core.delta;
179 this.zoomTimer += num * 0.3f;
180 float t = (flag || !camera.linearZoom) ? num : this.zoomTimer;
181 float num2 = Mathf.Lerp(
EMono.screen.Zoom,
this.targetZoom, t);
182 if (Mathf.Abs(num2 -
this.targetZoom) < (flag ? 0.0005f : 0.003f))
184 num2 = this.targetZoom;
186 if (camera.zoomToMouse &&
this.zoomPos != Vector3.zero)
188 this.position = Vector3.Lerp(this.position, this.zoomPos, t);
190 EMono.core.config.ApplyZoom(num2);
192 RenderObject.gameSpeed =
EMono.scene.actionMode.gameSpeed;
193 RenderObject.gameDelta = Core.gameDeltaNoPause;
194 if (
EMono.pc.currentZone ==
EMono._zone && !
EMono._zone.IsRegion &&
this.focusOption ==
null &&
this.focusPos ==
null && !
this.transFocus &&
this.fixFocus && (
this.instantFocus || !
EMono.core.config.camera.smoothFollow))
196 if (this.Zoom != this.targetZoom)
198 EMono.core.config.ApplyZoom(this.TargetZoom);
200 Vector3 vector = (EMono.pc.isSynced ? EMono.player.position : (*
EMono.pc.pos.Position())) + this.focusFix;
201 this.position = vector;
202 this.scrollX = Mathf.FloorToInt(this.position.x /
this.tileWorldSize.x) - this.width / 2 + (int)this.paddingOffset.x;
203 this.scrollY = Mathf.FloorToInt(this.position.y /
this.tileWorldSize.y) - this.height / 4 + (int)this.paddingOffset.y;
206 if (this.instantFocus)
208 this.instantFocus =
false;
210 this.RefreshPosition();
211 if (
EMono.game.activeZone !=
null)
213 for (
int i =
EMono._map.pointAnimes.Count - 1; i >= 0; i--)
215 if (
EMono._map.pointAnimes[i].Update())
217 EMono._map.pointAnimes.RemoveAt(i);
221 this.UpdateShaders(
EMono.scene.timeRatio);
225 Scene.skipAnime =
false;
228 FlockController flock =
EMono.scene.flock;
230 if (this.targetZoom <= 1.25f)
233 visible = (room ==
null || !room.HasRoof);
239 flock.UpdateVisible(visible);
240 if (
EMono.pc.isSynced &&
EMono.pc.renderer.orbit)
242 EMono.pc.renderer.orbit.Refresh();
247 public void UpdateShaders(
float time = 0f)
252 Color color2 = color.fog.Evaluate(time);
253 float value = light.nightRatioCurve.Evaluate(time);
254 Shader.SetGlobalFloat(this._Snow,
EMono._zone.IsSnowCovered ? 1f : 0f);
255 Shader.SetGlobalFloat(this._BackDrawPower, (
float)(
ActionMode.Cinema.IsActive ? 0 :
EMono.game.config.backDrawAlpha));
256 Shader.SetGlobalFloat(this._SkyLevel, this.SkyRate);
257 Shader.SetGlobalFloat(this._NightRate, value);
258 Shader.SetGlobalFloat(this._ViewHeight, this.ViewHeight);
259 Shader.SetGlobalFloat(this._FogStrength, color2.a * 0.1f);
260 Shader.SetGlobalColor(this._FogColor, color2);
262 if (
EMono._map.fowProfile)
264 fowProfile =
EMono._map.fowProfile;
268 FOWType type = fowProfile.type;
269 if (type != FOWType.Color)
271 if (type != FOWType.ColorAdd)
273 Shader.SetGlobalColor(this._FowColor, color.fow.Evaluate(time));
277 Shader.SetGlobalColor(this._FowColor, fowProfile.color * color.fow.Evaluate(time));
282 Shader.SetGlobalColor(this._FowColor, fowProfile.color);
287 Shader.SetGlobalColor(this._FowColor, color.fow.Evaluate(time));
289 Shader.SetGlobalColor(this._SunColor,
EMono._zone.IsSnowCovered ? color.sunSnow.Evaluate(time) : color.sun.Evaluate(time));
290 Shader.SetGlobalColor(this._SeaColor, color.sea.Evaluate(time));
291 Shader.SetGlobalColor(this._SkyColor, color.sky.Evaluate(time));
292 Shader.SetGlobalColor(this._SkyBGColor, color.skyBG.Evaluate(time));
293 Shader.SetGlobalVector(this._Offset,
EMono.core.config.camera.extendZoomMin ? (
this.position * 0.3f) : (
this.position * 0.5f));
294 Shader.SetGlobalFloat(this._Zoom, this.Zoom);
295 Shader.SetGlobalFloat(this._LightPower, light.lightPower.Evaluate(time) * light.lightPowerMod);
296 Shader.SetGlobalFloat(this._AnimeSpeedGlobal, (
float)
EMono.game.config.animeSpeed);
297 Shader.SetGlobalColor(this._ScreenFlash,
ScreenFlash.currentColor);
298 EMono.scene.godray.main.startColor = (EMono._zone.IsSnowCovered ? color.godraySnow.Evaluate(time) : color.godray.Evaluate(time));
299 this.camSupport.grading.vignettePower = light.vignetteCurve.Evaluate(time);
300 this.camSupport.grading.UpdateVignette(0f);
301 this.camSupport.bloom.threshold = light.bloomCurve.Evaluate(time);
302 this.camSupport.beautify.bloomIntensity = light.bloomCurve2.Evaluate(time);
306 public virtual void OnChangeHour()
311 public unsafe
virtual void RefreshPosition()
317 if (this.focusOption !=
null)
319 Vector3 vector = this.focusOption.player ? (*
EMono.pc.pos.Position() + this.focusFix) : (*this.focusOption.pos.PositionCenter());
320 vector.z = this.position.z;
321 if (this.focusOption.linear)
323 this.position = Vector3.MoveTowards(this.position, vector, this.focusOption.speed * Core.delta);
327 this.position = Vector3.Lerp(this.position, vector, this.focusOption.speed * Core.delta);
330 else if (this.focusPos !=
null)
332 this.focusPos =
new Vector3?(
new Vector3((this.focusPos ?? this.position).x, (this.focusPos ?? this.position).y, this.position.z));
333 this.position = Vector3.Lerp(this.position, this.focusPos ?? this.position, this.focusSpeedSlow * Core.delta);
334 if (Vector3.Distance(
this.position,
this.focusPos ??
this.position) < 0.1f)
336 this.focusPos =
null;
339 else if (this.transFocus)
341 this.pushBack = Vector3.zero;
342 this.position.x = this.transFocus.position.x;
343 this.position.y = this.transFocus.position.y;
345 else if (this.fixFocus)
347 float z = this.position.z;
348 this.targetZoom = this.TargetZoom;
349 for (
int i = 0; i <
EMono.core.config.camera.zooms.Length; i++)
351 if (this.targetZoom ==
EMono.core.config.camera.zooms[i])
353 this.targetZoomIndex = i;
356 Vector3 b = (EMono.pc.isSynced ? EMono.player.position : (*
EMono.pc.pos.Position())) + this.focusFix;
357 if (this.instantFocus)
361 else if (
EMono.core.config.camera.smoothFollow)
363 this.position = Vector3.Lerp(this.position, b, this.focusSpeed * Core.delta * Mathf.Lerp(0.2f, 1f, 1f - Mathf.Clamp(
ActionMode.Adv.rightMouseTimer, 0f, 1f)));
370 this.pcOrbit.transform.position =
EMono.pc.renderer.position;
378 this.pushBack = Vector3.zero;
379 int num = this.scrollX - this.scrollY;
380 int num2 = this.scrollY + this.scrollX;
381 if ((
float)num <= this.mapLimit.x)
383 this.pushBack.x = this.mapLimit.x - (float)num;
385 if ((
float)num2 <= this.mapLimit.y)
387 this.pushBack.y = this.mapLimit.y - (float)num2;
389 if ((
float)num >= (
float)
EMono._map.Size +
this.mapLimit.width - (
float)(
this.width / 2))
391 this.pushBack.x = (float)
EMono._map.Size +
this.mapLimit.width - (
float)(this.width / 2) - (
float)num;
393 if ((
float)num2 >= (
float)
EMono._map.Size +
this.mapLimit.height - (
float)(
this.height / 2))
395 this.pushBack.y = (float)
EMono._map.Size +
this.mapLimit.height - (
float)(this.height / 2) - (
float)num2;
397 this.position += Quaternion.Euler(this.planeAngle) * this.pushBack * Core.delta * this.pushbackSpeed;
399 this.scrollX = Mathf.FloorToInt(this.position.x /
this.tileWorldSize.x) - this.width / 2 + (int)this.paddingOffset.x;
400 this.scrollY = Mathf.FloorToInt(this.position.y /
this.tileWorldSize.y) - this.height / 4 + (int)this.paddingOffset.y;
401 if (this.lastPos.x != (
float)
this.scrollX ||
this.lastPos.y != (
float)
this.scrollY)
403 this.lastPos.x = (float)this.scrollX;
404 this.lastPos.y = (float)this.scrollY;
406 this.camPos.x = this.position.x;
407 this.camPos.y = this.position.y;
408 this.SnapScreen(ref this.camPos, this.Zoom);
409 this.camPos.z = -500f;
410 this._camPos.x = this.camPos.x + this.screenFixX2 + this.screenFixX4;
411 this._camPos.y = this.camPos.y + this.screenFixY2 + this.screenFixY4;
412 this._camPos.z = this.camPos.z;
413 EMono.scene.cam.transform.localPosition = this._camPos;
415 EMono.scene.transAudio.position = this.camPos;
423 public void RefreshAll()
425 this.RefreshScreenSize();
426 bool indoor =
EMono._map.config.indoor;
427 ScreenGrading grading = this.camSupport.grading;
428 EMono.scene.flock.SetActive(!indoor);
431 grading.material.DisableKeyword(
"CLOUD_ON");
435 grading.material.EnableKeyword(
"CLOUD_ON");
437 grading.profile.vignette.enable =
EMono.scene.profile.light.vignette;
438 grading.profile.vignette.vignetteColor =
EMono.scene.profile.light.vignetteColor;
444 public void RefreshScreenSize()
446 this.Zoom =
EMono.scene.camSupport.Zoom;
447 this.width = (int)((
float)Screen.width /
this.tileSize.x /
this.Zoom) + (int)this.paddings.x + 2;
448 this.height = (int)((
float)Screen.height / (
this.tileSize.y / 2f) /
this.Zoom) + (int)this.paddings.y + 4;
449 this.camSupport.divier =
EMono.core.config.fix.divider;
450 this.camSupport.ResizeCameraToPixelPerfect();
451 Vector3 localScale =
new Vector3(
EMono.scene.cam.orthographicSize * ((
float)Screen.width / (
float)Screen.height) * 2.5f,
EMono.scene.cam.orthographicSize * 2.5f, 1f);
452 if (
EMono.core.IsGameStarted)
454 EMono.scene.skyBG.transform.localScale = localScale;
455 float num = (ActionMode.IsAdv || this.Zoom >= 1f ||
EMono._map.IsIndoor) ? 0f : (0.4f / this.Zoom);
456 if (
EMono.world.weather.CurrentCondition ==
Weather.Condition.SnowHeavy)
460 if (!
EMono.player.simulatingZone)
462 EMono.scene.sfxWind.SetVolume(Mathf.Min(num, 1f));
465 Vector3 vector =
EMono.scene.cam.transform.position;
466 EMono.scene.cam.transform.position = Vector3.zero;
467 Vector3 vector2 =
EMono.scene.cam.WorldToScreenPoint(Vector3.zero);
468 this.screenFixX2 = vector2.x % this.screenFixX * this.screenFixX3;
469 this.screenFixY2 = vector2.y % this.screenFixY * this.screenFixY3;
470 EMono.scene.cam.transform.position = vector;
474 public Point GetRandomPoint()
476 int num = EMono.screen.scrollX - EMono.screen.scrollY + this.width / 2 - (this.height / 2 + 1) / 2;
477 int num2 = EMono.screen.scrollY + EMono.screen.scrollX + this.width / 2 + this.height / 2 / 2;
478 num = num - 20 +
EMono.rnd(40);
479 num2 = num2 - 20 +
EMono.rnd(40);
480 return this._randomPoint.Set(num, num2);
484 public void RefreshSky()
487 bool indoor =
EMono._map.config.indoor;
488 EMono.scene.firefly.baseParticleCount = graphic.fireflyCount;
489 EMono.scene.fireflyNight.baseParticleCount = graphic.fireflyCount * 10;
490 EMono.scene.star.baseParticleCount = graphic.starCount;
491 EMono.scene.star.gameObject.GetComponent<ParticleSystemRenderer>().enabled =
EMono.world.date.IsNight;
492 EMono.scene.star.SetActive(this.IsLocalMap && !indoor);
493 EMono.scene.firefly.SetActive(this.IsLocalMap && graphic.firefly && !indoor);
494 EMono.scene.fireflyNight.SetActive(this.IsLocalMap && graphic.firefly && !indoor);
495 if (this.overlayShadow &&
EMono.scene.profile.matOverlay &&
this is
GameScreen)
497 this.overlayShadow.sharedMaterial.SetFloat(
"_ShadowStrength",
EMono._map.config.shadowStrength * (
EMono._zone.IsSnowCovered ? 0.5f : 1f) *
EMono.setting.render.shadowStrength);
499 this.RefreshWeather();
500 this.RefreshGrading();
504 public virtual void RefreshWeather()
507 if (!
EMono._map.config.indoor)
509 if (
EMono.pc.IsInActiveZone)
512 flag = (room !=
null && room.HasRoof);
525 bool flag3 = room2 !=
null && room2.data.atrium;
527 Weather.Condition currentCondition = weather.CurrentCondition;
528 EMono.scene.filterRain.enabled = (!flag2 && weather.IsRaining &&
EMono.core.config.graphic.enhanceRain);
529 EMono.scene.filterRain.Fade = ((currentCondition ==
Weather.Condition.RainHeavy) ? 0.4f : 0.3f);
530 EMono.scene.rain.enableEmission = (!flag2 && weather.IsRaining);
531 EMono.scene.rain.emission.rateOverTime = (float)((currentCondition ==
Weather.Condition.RainHeavy) ? 750 : 200);
532 EMono.scene.snow.enableEmission = (!flag2 && currentCondition ==
Weather.Condition.Snow);
533 EMono.scene.ether.enableEmission = (!flag2 && weather.IsEther);
534 bool enableEmission = !flag2 && weather.IsBlossom;
535 ParticleSystem[] array =
EMono.scene.blossoms;
536 for (
int i = 0; i < array.Length; i++)
538 array[i].enableEmission = enableEmission;
540 enableEmission = (!flag2 && currentCondition == Weather.Condition.SnowHeavy &&
EMono.core.config.graphic.blizzard);
541 array =
EMono.scene.blizzards;
542 for (
int i = 0; i < array.Length; i++)
544 array[i].enableEmission = enableEmission;
546 EMono.scene.transBlizzard.localScale =
new Vector3(1f, 1f, 1f);
547 bool flag4 = (EMono._map.config.forceGodRay || (EMono.core.config.graphic.godray && !flag2 && (currentCondition == Weather.Condition.Fine || currentCondition ==
Weather.Condition.Snow))) && !
BuildMenu.Instance;
548 EMono.scene.godray.SetActive(flag4, delegate(
bool enabled)
552 EMono.scene.godray.Clear();
555 EMono.scene.godrayDust.SetActive(flag4 &&
EMono.world.date.IsNight);
556 EMono.scene.snow.SetActive(
true);
557 EMono.scene.rain.SetActive(
true);
558 EMono.scene.ether.SetActive(
true);
559 EMono.scene.blossom.SetActive(
true);
560 float num = (EMono._zone.lv <= -2) ? 0f : ((EMono._zone.lv <= -1) ? 0.3f : ((flag2 && !flag3) ? 0.6f : 1f));
561 EMono.scene.sfxRain.SetVolume(weather.IsRaining ? num : 0f);
562 EMono.scene.sfxSea.SetVolume(
EMono._zone.VolumeSea * num);
563 EMono.scene.camSupport.grading.profile.fog =
EMono.setting.render.fogs[
EMono._map.config.fog];
564 EMono.scene.camSupport.grading.userFog = ((!EMono._map.config.indoor && flag2) ? 0f : 1f);
565 float num2 = (!EMono._map.IsIndoor &&
EMono.world.weather.IsRaining) ? ((currentCondition ==
Weather.Condition.RainHeavy) ? -0.08f : -0.04f) : 0f;
566 if (
EMono._zone.IsSnowCovered)
568 num2 +=
EMono.scene.profile.global.snowBrightness;
570 this.camSupport.grading.sceneBrightness = num2;
571 EMono.scene.rain.main.prewarm = (EMono.scene.snow.main.prewarm = (EMono.scene.ether.main.prewarm =
false));
572 array =
EMono.scene.blossoms;
573 for (
int i = 0; i < array.Length; i++)
575 array[i].main.prewarm =
false;
577 this.camSupport.grading.SetGrading();
581 public void RefreshGrading()
583 float timeRatio = EMono.core.IsGameStarted ? EMono.scene.timeRatio : 0f;
584 if (this.camSupport.grading.profile.overlay)
586 this.camSupport.grading.profile.overlay.Refresh(timeRatio,
EMono._zone.IsSnowCovered);
588 ScreenGrading.blind =
EMono.pc.isBlind;
589 this.camSupport.grading.profile.sharpen.enable = (EMono.core.config.graphic.sharpen > 0);
590 this.camSupport.grading.profile.sharpen.Strength = Mathf.Clamp(0.1f * (
float)
EMono.core.config.graphic.sharpen, 0f, (
this is
GameScreen) ? 10f : 1f);
591 this.camSupport.beautify.sharpen = Mathf.Clamp(0.01f * (
float)
EMono.core.config.graphic.sharpen2, 0f, (
this is
GameScreen) ? 10f : 0.5f);
592 this.camSupport.grading.SetGrading();
594 Color color =
EMono._map.config.colorScreen.Get();
597 color = sceneTemplate.colorScreen;
599 this.camSupport.beautify.tintColor = color;
600 color =
EMono._map.config.colorSea.Get();
601 MATERIAL.sourceWaterSea.matColor = ((color.a == 0f) ?
MATERIAL.sourceWaterSea.GetColor() : color);
602 EMono.core.config.RefreshUIBrightness();
604 if (!
EMono._map.IsIndoor)
606 num += 0.01f * EMono.core.config.test.brightnessNight *
EMono.scene.profile.light.nightRatioCurve.Evaluate(
EMono.scene.timeRatio);
608 this.camSupport.grading.nightBrightness = num;
612 public void RefreshTilt()
614 this.camSupport.tiltShift.enabled = ((ActionMode.Bird.IsActive ||
EMono._zone.IsRegion) ? EMono.game.config.tiltRegion :
EMono.game.config.tilt);
615 this.camSupport.tiltShift.blurArea = (ActionMode.Bird.IsActive ? 12f : (0.1f * (float)(EMono._zone.IsRegion ? EMono.game.config.tiltPowerRegion :
EMono.game.config.tiltPower)));
619 public void ScrollMouse(
float x,
float y)
621 this.position.x = this.position.x + x / this.Zoom;
622 this.position.y = this.position.y + y / this.Zoom;
623 if (x > 0.1f || x < -0.1f || y > 0.1f || y < 0.1f)
625 this.RefreshPosition();
630 public void ScrollAxis(Vector3 axis,
bool direct =
false)
634 this.position += axis;
637 this.position += axis * Core.delta * this.camSpeed2 * EMono.core.config.camera.senseKeyboard / this.Zoom;
641 public void Focus(
Int3 ints)
643 this.position =
new Vector3((
float)ints.x, (
float)ints.y, (
float)ints.z);
647 public void Focus(
int x,
int y)
655 this.position.x = (float)x;
657 this.position.y = (float)y;
661 public void Focus(
Card c)
667 this.Focus(c.GetRootCard().pos);
671 public void FocusCenter()
678 public unsafe
void Focus(
Point pos)
680 this.position = *pos.PositionCenter();
684 public void FocusPC()
686 this.focusPos =
null;
687 this.Focus((
EMono.pc.currentZone ==
EMono.game.activeZone) ?
EMono.pc.pos :
EMono._map.bounds.GetCenterPos());
688 this.instantFocus =
true;
689 this.RefreshPosition();
693 public void FocusImmediate(
Point pos)
695 this.focusPos =
null;
697 this.instantFocus =
true;
698 this.RefreshPosition();
699 this.RefreshPosition();
703 public void SnapScreen(ref Vector3 v,
float zoom)
705 float num = this.snapSize.x / zoom;
706 float num2 = this.snapSize.y / zoom;
707 switch (
EMono.core.config.fix.snapType)
710 v.x = num * (float)Mathf.RoundToInt(v.x / num);
711 v.y = num2 * (float)Mathf.RoundToInt(v.y / num2);
714 v.x = num * (float)Mathf.FloorToInt(v.x / num);
715 v.y = num2 * (float)Mathf.FloorToInt(v.y / num2);
718 v.x = num * (float)Mathf.CeilToInt(v.x / num);
719 v.y = num2 * (float)Mathf.CeilToInt(v.y / num2);
722 num = this.snapSize.x;
723 num2 = this.snapSize.y;
724 v.x = num * (float)Mathf.RoundToInt(v.x / num);
725 v.y = num2 * (float)Mathf.RoundToInt(v.y / num2);
728 num = this.snapSize.x;
729 num2 = this.snapSize.y;
730 v.x = num * (float)Mathf.FloorToInt(v.x / num);
731 v.y = num2 * (float)Mathf.FloorToInt(v.y / num2);
734 num = this.snapSize.x;
735 num2 = this.snapSize.y;
736 v.x = num * (float)Mathf.CeilToInt(v.x / num);
737 v.y = num2 * (float)Mathf.CeilToInt(v.y / num2);
740 v.x = 0.01f * (float)Mathf.FloorToInt(v.x * 100f) + 0.001f;
741 v.y = 0.01f * (float)Mathf.FloorToInt(v.y * 100f) + 0.001f;
744 v.x = 0.01f * (float)Mathf.FloorToInt(v.x * 100f) - 0.001f;
745 v.y = 0.01f * (float)Mathf.FloorToInt(v.y * 100f) - 0.001f;
748 v.x = 0.01f * (float)Mathf.RoundToInt(v.x * 100f) + 0.005f;
749 v.y = 0.01f * (float)Mathf.RoundToInt(v.y * 100f) + 0.005f;
752 v.x = 0.01f * (float)Mathf.RoundToInt(v.x * 100f) + 0.025f;
753 v.y = 0.01f * (float)Mathf.RoundToInt(v.y * 100f) + 0.025f;
761 public void SetZoom(
float z)
765 EMono.core.config.ApplyZoom(this.targetZoom);
770 public void SetTargetZoomIndex(
int index)
772 this.targetZoomIndex = index;
773 float num = this.targetZoom;
774 this.targetZoom =
EMono.core.config.camera.zooms[this.targetZoomIndex];
775 if (num != this.targetZoom)
782 public void ModTargetZoomIndex(
int a)
784 if (
EMono.scene.elomapActor.IsActive)
788 int num = this.targetZoomIndex;
789 this.targetZoomIndex -= a;
790 int num2 = EMono.core.config.camera.extendZoomMin ? 0 : 1;
791 int num3 = EMono.core.config.camera.extendZoomMax ? 4 : 3;
792 if (this.targetZoomIndex < num2)
794 this.targetZoomIndex = num2;
796 else if (this.targetZoomIndex >= num3)
798 this.targetZoomIndex = num3;
800 if (this.targetZoomIndex > num && EInput.buttonScroll !=
null && !EInput.buttonScroll.pressing)
802 this.zoomPos = EInput.mposWorld;
804 this.SetTargetZoomIndex(this.targetZoomIndex);
808 private readonly
int _BackDrawPower = Shader.PropertyToID(
"_BackDrawPower");
811 private readonly
int _Snow = Shader.PropertyToID(
"_Snow");
814 private readonly
int _SkyLevel = Shader.PropertyToID(
"_SkyLevel");
817 private readonly
int _NightRate = Shader.PropertyToID(
"_NightRate");
820 private readonly
int _ViewHeight = Shader.PropertyToID(
"_ViewHeight");
823 private readonly
int _FogStrength = Shader.PropertyToID(
"_FogStrength");
826 private readonly
int _FogColor = Shader.PropertyToID(
"_FogColor");
829 private readonly
int _FowColor = Shader.PropertyToID(
"_FowColor");
832 private readonly
int _SunColor = Shader.PropertyToID(
"_SunColor");
835 private readonly
int _SeaColor = Shader.PropertyToID(
"_SeaColor");
838 private readonly
int _SkyColor = Shader.PropertyToID(
"_SkyColor");
841 private readonly
int _SkyBGColor = Shader.PropertyToID(
"_SkyBGColor");
844 private readonly
int _Offset = Shader.PropertyToID(
"_Offset");
847 private readonly
int _Zoom = Shader.PropertyToID(
"_Zoom");
850 private readonly
int _LightPower = Shader.PropertyToID(
"_LightPower");
853 private readonly
int _AnimeSpeedGlobal = Shader.PropertyToID(
"_AnimeSpeedGlobal");
856 private readonly
int _ScreenFlash = Shader.PropertyToID(
"_ScreenFlash");
859 public float SharpenAmount;
862 public float camSpeed2;
865 public float heightLight;
868 public float pushbackSpeed;
871 public Vector2 snapSize;
874 public Vector2 tileSize;
877 public Vector2 tileAlign;
880 public Vector2 tileWorldSize;
883 public Vector2 tileViewSize;
886 public Vector3 tileWeight;
889 public Vector3 focusFix;
892 public Vector3 tileOffsetHeight;
895 public Vector3 tileWeightHeight;
898 public Vector3 planeAngle;
901 public Vector3 planeSpeed;
904 public Vector2 paddings;
907 public Vector2 paddingOffset;
910 public Vector3 lastPos;
913 public Rect mapLimit;
921 public float nextMove;
925 public float focusSpeed;
929 public float focusSpeedSlow;
933 public float focusSpeedSlow2;
948 public int moonLevel;
963 public MeshRenderer overlayShadow;
970 public float forcePrecision;
974 public bool isCameraMoving;
982 public Vector3? focusPos;
986 public Vector3 position;
989 protected Vector3 camPos;
992 protected Vector3 pushBack;
995 public float screenFixX;
998 public float screenFixX2;
1001 public float screenFixX3;
1004 public float screenFixX4;
1007 public float screenFixY;
1010 public float screenFixY2;
1013 public float screenFixY3;
1016 public float screenFixY4;
1019 private Vector3 _camPos;
1026 public bool instantFocus;
1029 public int targetZoomIndex;
1032 public float targetZoom = 0.5f;
1035 public float zoomTimer;
1038 public Vector3 zoomPos;
1047 public float speed = 2f;
1050 public bool linear =
true;