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");
369 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(
actionMode.
gameSpeed * 0.75f, 1f, 2f) : 1f);
386 EInput.isShiftDown =
true;
390 EInput.isAltDown =
true;
397 EInput.isShiftDown =
true;
401 EInput.isAltDown =
true;
408 EInput.isShiftDown =
true;
412 EInput.isAltDown =
true;
415 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
436 num = (EInput.wheel = 0);
438 Slider componentOf2 =
InputModuleEX.GetComponentOf<Slider>();
442 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
443 num = (EInput.wheel = 0);
449 if ((
bool)componentOf3)
459 num = (EInput.wheel = 0);
462 if (
EMono.
ui.contextMenu.isActive)
464 Slider componentOf4 =
InputModuleEX.GetComponentOf<Slider>();
465 if ((
bool)componentOf4)
467 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
468 num = (EInput.wheel = 0);
473 if ((
bool)componentOf5)
475 num = (EInput.wheel = 0);
476 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
482 if ((
bool)componentOf6 && componentOf6.onInputWheel !=
null)
485 num = (EInput.wheel = 0);
491 if (layer !=
null && layer.
windows.Count > 0)
496 num = (EInput.wheel = 0);
514 godray.SetActive(enable:
false);
530 srTarget.enabled =
true;
534 srTarget.transform.parent.position = position;
538 srTarget.enabled =
false;
543 EMono.player.pickupDelay = 0f;
570 EMono.player.deathDialog =
true;
571 EMono.player.returnInfo =
null;
572 EMono.player.ignoreFallOver = 1;
577 string lastWord = list.RandomItem();
587 EInput.haltInput =
false;
588 Dialog.
InputName(
"dialogLastword", lastWord, delegate(
bool cancel,
string text)
595 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
599 Msg.
Say(lastWord.Bracket(1));
600 List<string> list2 =
new List<string>();
607 list2.Add(
"pc_revive_town".lang(lastTown.Name));
609 list2.Add(
"pc_revive");
610 list2.Add(
"pc_gameover");
614 list2.Add(
"pc_gameover");
616 Debug.Log(list2.Count);
619 EMono.ui.CloseLayers();
620 Dialog.List(
"pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
622 EMono.player.deathDialog = false;
623 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
625 EMono.pc.MakeGrave(lastWord);
627 EMono.pc.RecalculateFOV();
628 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
629 if (addTownRevive && c == 0)
633 if (EMono.game.activeZone == zone)
635 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return).GetNearestPoint() ?? EMono._map.GetCenterPos(), silent: true, force: true);
639 EMono.player.deathZoneMove = true;
640 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
642 EMono.screen.FocusPC();
644 if (EMono.player.stats.death == 0)
646 Tutorial.Reserve(
"death");
648 EMono.player.stats.death++;
649 if (EMono.player.stats.days <= 90)
651 EMono.player.stats.death2++;
656 EMono.game.GotoTitle(showDialog: false);
681 EMono.player.wasDirtyWeight =
false;
687 else if (
EMono.
ui.mouseInfo.gameObject.activeSelf)
738 EMono.player.lastTransition =
null;
757 CursorSystem.position.z = -100f;
791 foreach (Transform componentsInDirectChild
in EMono.
ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
793 if (componentsInDirectChild.gameObject.tag !=
"IgnoreDestroy" && !componentsInDirectChild.GetComponent<
TC>())
795 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
807 skyBG.SetActive(bg.
skyBox);
808 skyBG.sharedMaterial = bg.
mat;
809 skyPlane.SetActive(bg.
plane);
810 skyPlane.sharedMaterial = bg.
mat;
811 cam.clearFlags = ((!EMono.core.config.graphic.alwaysClearCamera && bg.
skyBox) ? CameraClearFlags.Depth : CameraClearFlags.Color);
838 ScreenGrading grading = camSupport.
grading;
839 ScreenGradingProfile.Lut lut = grading.lut;
847 lut.tex = Resources.Load<Texture2D>(
"Scene/Profile/Lut/" + conf.
idLut);
853 grading.SetGrading();
860 m.EnableKeyword(
"WAVE_ON");
861 Vector4[] array =
new Vector4[4]
863 new Vector4(-2f, -1f, -1f, 1f),
864 new Vector4(1f, 0f, 1f, 1f),
865 new Vector4(2f, 1f, -1f, 1f),
866 new Vector4(-1f, 0f, 1f, 1f)
868 m.SetVector(
"_WaveDir", array[conf.
seaDir - 1]);
872 m.DisableKeyword(
"WAVE_ON");
972 hideBalloon = !hideBalloon;
973 EMono.
ui.ShowBalloon(!hideBalloon);
1002 SoundManager.bgmDumpMod = 0f;
1003 foreach (
ActorEx value
in dictActorEx.Values)
1011 foreach (
ActorEx value
in dictActorEx.Values)
1015 dictActorEx.Clear();
1020 ActorEx actorEx = dictActorEx.TryGetValue(c);
1021 if (!(actorEx !=
null))
1024 onBeforeSetOwner?.Invoke(actorEx);
1026 dictActorEx.Add(c, actorEx);
1032 ActorEx actorEx = dictActorEx.TryGetValue(c);
1033 if (!(actorEx ==
null))
1036 dictActorEx.Remove(c);
1043 for (
int i = 0; i < array.Length; i++)
1054 pivot =
new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1066 for (
int i = 0; i < array.Length; i++)
1074 for (
int i = 0; i < array.Length; i++)
1088 for (
int num = syncList.Count - 1; num >= 0; num--)
1091 if (syncScreen.
Sync != syncFrame)
1094 syncList.RemoveAt(num);
1098 RenderObject.syncFrame = syncFrame;
1103 Transform transform =
Util.Instantiate<Transform>(
"Scene/Prefab/" + id);
1104 transform.name = id;
1105 loadedPrefabs.Add(transform.gameObject);
1111 foreach (GameObject loadedPrefab
in loadedPrefabs)
1113 UnityEngine.Object.Destroy(loadedPrefab);
1115 loadedPrefabs.Clear();
1120 GameObject gameObject = GameObject.Find(
id);
1121 if ((
bool)gameObject)
1123 UnityEngine.Object.DestroyImmediate(gameObject);
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
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)
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
ZoneTransition lastTransition
void RefreshCurrentHotItem()
ref Vector3 PositionCenter()
void Build(Point _p, Mode _mode=Mode.Passive)
static void Apply(string id)
void Revelation(string idTalk, 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