2using System.Collections.Generic;
3using CreativeSpore.SuperTilemapEditor;
49 public ParticleSystem
rain;
51 public ParticleSystem
snow;
137 public List<ISyncScreen>
syncList =
new List<ISyncScreen>();
144 public Dictionary<Card, ActorEx>
dictActorEx =
new Dictionary<Card, ActorEx>();
153 InvokeRepeating(
"RefreshActorEx", 0.5f, 0.5f);
162 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
173 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
180 Debug.Log(
"Scene.Init:" + newMode);
197 SoundManager.bgmVolumeMod = (SoundManager.bgmDumpMod = 0f);
224 EMono.player.target =
null;
232 EMono.core.config.game.ignoreWarnCrime = (EMono.core.config.game.ignoreWarnMana = (EMono.core.config.game.ignoreWarnDisassemble = (EMono.core.config.game.ignoreWarnSlaughter =
false)));
234 CellDetail.count = 0;
237 EMono.player.Agent.renderer.isSynced =
true;
245 Popper.scale = (EMono._zone.IsRegion ?
new Vector3(1.7f, 1.7f, 1f) : Vector3.one);
272 EMono.screen.tileMap.activeCount = 0;
300 EMono.player.onStartZone =
null;
302 ActionMode.LastBuildMode =
null;
330 EMono.
ui.widgets.Activate(
"QuestTracker");
368 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(
actionMode.
gameSpeed * 0.75f, 1f, 2f) : 1f);
385 EInput.isShiftDown =
true;
389 EInput.isAltDown =
true;
396 EInput.isShiftDown =
true;
400 EInput.isAltDown =
true;
407 EInput.isShiftDown =
true;
411 EInput.isAltDown =
true;
414 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
435 num = (EInput.wheel = 0);
437 Slider componentOf2 =
InputModuleEX.GetComponentOf<Slider>();
441 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
442 num = (EInput.wheel = 0);
448 if ((
bool)componentOf3)
458 num = (EInput.wheel = 0);
461 if (
EMono.
ui.contextMenu.isActive)
463 Slider componentOf4 =
InputModuleEX.GetComponentOf<Slider>();
464 if ((
bool)componentOf4)
466 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
467 num = (EInput.wheel = 0);
472 if ((
bool)componentOf5)
474 num = (EInput.wheel = 0);
475 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
481 if ((
bool)componentOf6 && componentOf6.onInputWheel !=
null)
484 num = (EInput.wheel = 0);
490 if (layer !=
null && layer.
windows.Count > 0)
495 num = (EInput.wheel = 0);
513 godray.SetActive(enable:
false);
529 srTarget.enabled =
true;
533 srTarget.transform.parent.position = position;
537 srTarget.enabled =
false;
542 EMono.player.pickupDelay = 0f;
573 EMono.player.deathDialog =
true;
574 EMono.player.returnInfo =
null;
575 EMono.player.ignoreFallOver = 1;
580 string lastWord = list.RandomItem();
590 EInput.haltInput =
false;
591 Dialog.
InputName(
"dialogLastword", lastWord, delegate(
bool cancel,
string text)
598 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
602 Msg.
Say(lastWord.Bracket(1));
603 List<string> list2 =
new List<string>();
610 list2.Add(
"pc_revive_town".lang(lastTown.Name));
612 list2.Add(
"pc_revive");
613 list2.Add(
"pc_gameover");
617 list2.Add(
"pc_gameover");
619 Debug.Log(list2.Count);
622 EMono.ui.CloseLayers();
623 Dialog.List(
"pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
625 EMono.player.deathDialog = false;
626 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
628 EMono.pc.MakeGrave(lastWord);
630 EMono.pc.RecalculateFOV();
631 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
632 if (addTownRevive && c == 0)
636 if (EMono.game.activeZone == zone)
638 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return).GetNearestPoint() ?? EMono._map.GetCenterPos(), silent: true, force: true);
642 EMono.player.deathZoneMove = true;
643 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
645 EMono.screen.FocusPC();
647 if (EMono.player.stats.death == 0)
649 Tutorial.Reserve(
"death");
651 EMono.player.stats.death++;
652 if (EMono.player.stats.days <= 90)
654 EMono.player.stats.death2++;
659 EMono.game.GotoTitle(showDialog: false);
684 EMono.player.wasDirtyWeight =
false;
690 else if (
EMono.
ui.mouseInfo.gameObject.activeSelf)
741 EMono.player.lastTransition =
null;
760 CursorSystem.position.z = -100f;
794 foreach (Transform componentsInDirectChild
in EMono.
ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
796 if (componentsInDirectChild.gameObject.tag !=
"IgnoreDestroy" && !componentsInDirectChild.GetComponent<
TC>())
798 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
810 skyBG.SetActive(bg.
skyBox);
811 skyBG.sharedMaterial = bg.
mat;
812 skyPlane.SetActive(bg.
plane);
813 skyPlane.sharedMaterial = bg.
mat;
814 cam.clearFlags = ((!EMono.core.config.graphic.alwaysClearCamera && bg.
skyBox) ? CameraClearFlags.Depth : CameraClearFlags.Color);
841 ScreenGrading grading = camSupport.
grading;
842 ScreenGradingProfile.Lut lut = grading.lut;
850 lut.tex = Resources.Load<Texture2D>(
"Scene/Profile/Lut/" + conf.
idLut);
856 grading.SetGrading();
863 m.EnableKeyword(
"WAVE_ON");
864 Vector4[] array =
new Vector4[4]
866 new Vector4(-2f, -1f, -1f, 1f),
867 new Vector4(1f, 0f, 1f, 1f),
868 new Vector4(2f, 1f, -1f, 1f),
869 new Vector4(-1f, 0f, 1f, 1f)
871 m.SetVector(
"_WaveDir", array[conf.
seaDir - 1]);
875 m.DisableKeyword(
"WAVE_ON");
975 hideBalloon = !hideBalloon;
976 EMono.
ui.ShowBalloon(!hideBalloon);
1005 SoundManager.bgmDumpMod = 0f;
1006 foreach (
ActorEx value
in dictActorEx.Values)
1014 foreach (
ActorEx value
in dictActorEx.Values)
1018 dictActorEx.Clear();
1023 ActorEx actorEx = dictActorEx.TryGetValue(c);
1024 if (!(actorEx !=
null))
1027 onBeforeSetOwner?.Invoke(actorEx);
1029 dictActorEx.Add(c, actorEx);
1035 ActorEx actorEx = dictActorEx.TryGetValue(c);
1036 if (!(actorEx ==
null))
1039 dictActorEx.Remove(c);
1046 for (
int i = 0; i < array.Length; i++)
1057 pivot =
new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1069 for (
int i = 0; i < array.Length; i++)
1077 for (
int i = 0; i < array.Length; i++)
1091 for (
int num = syncList.Count - 1; num >= 0; num--)
1094 if (syncScreen.
Sync != syncFrame)
1097 syncList.RemoveAt(num);
1101 RenderObject.syncFrame = syncFrame;
1106 Transform transform =
Util.Instantiate<Transform>(
"Scene/Prefab/" + id);
1107 transform.name = id;
1108 loadedPrefabs.Add(transform.gameObject);
1114 foreach (GameObject loadedPrefab
in loadedPrefabs)
1116 UnityEngine.Object.Destroy(loadedPrefab);
1118 loadedPrefabs.Clear();
1123 GameObject gameObject = GameObject.Find(
id);
1124 if ((
bool)gameObject)
1126 UnityEngine.Object.DestroyImmediate(gameObject);
static void CancelKeepPlaying()
void SetPressedAction(ButtonState button)
virtual void RefreshArrow()
virtual void OnBeforeUpdate()
virtual void OnUpdateCursor()
void Pause(bool sound=false)
void Activate(bool toggle=true, bool forceActivate=false)
virtual void OnAfterUpdate()
void WaitForEndOfFrame(Action action)
virtual void OnChangeHour()
BaseTileSelector tileSelector
void UpdateShaders(float time=0f)
static void PublishEvent(string eventId, object data=null)
MeshPass passAutoTileWater
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
void PlayAnime(AnimeID id, bool force=false)
override bool IsAliveInCurrentZone
void Stumble(int mtp=100)
bool ignoreLinuxModWarning
bool ignoreParallelsWarning
static void SetCursor(CursorInfo info=null, int _priority=0)
static CursorSystem Instance
static void TryWarn(string lang, Action action, bool yes=true, string text=null)
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
static GameSetting setting
static BaseGameScreen screen
static SoundManager Sound
static EffectManager Instance
static void DeleteGame(string id, bool cloud, bool deleteBackup=true)
bool Save(bool isAutoSave=false, bool silent=false)
ZoneTransition transition
static string[] GetList(string id)
static LayerAbility Instance
void SetDuration(float duration, Action onKill)
static void Apply(string id)
static ModItemList< Sprite > sprites
List< ModItem< T > > list
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
ZoneTransition lastTransition
void RefreshCurrentHotItem()
ref Vector3 PositionCenter()
void Build(Point _p, Mode _mode=Mode.Passive)
static void Apply(string id)
virtual void Revelation(string idTalk, Card c, int chance=100)
List< ISyncScreen > syncList
ParticleSystem psRainSplashWater
void ToggleHighlightArea()
DamageTextRenderer damageTextRenderer
ParticleSystem godrayDust
GameSetting.RenderSetting.MapBGSetting bg
Dictionary< Card, ActorEx > dictActorEx
void ToggleBirdView(bool sound=true)
void DestroyPrefab(string id)
void RemoveActorEx(Card c)
Transform LoadPrefab(string id)
CameraFilterPack_Atmosphere_Rain filterRain
ParticleSystem psRainSplash
SoundSource sfxUnderwater
void AddActorEx(Card c, Action< ActorEx > onBeforeSetOwner=null)
ParticleSystem etherBlossom
GameScreenNoMap screenNoMap
AudioListener audioListener
ParticleSystem[] blizzards
void FocusAndPause(Point pos, int a)
List< GameObject > loadedPrefabs
GameScreenElona screenElona
ParticleSystem[] blossoms
static Sprite Get(string id)
static Dictionary< string, Sprite > dict
static UIDropdown activeInstance
static WidgetMainText Instance
void RefreshElectricity()
virtual FlockController.SpawnType FlockType
virtual bool IsUnderwater