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);
196 SoundManager.bgmVolumeMod = (SoundManager.bgmDumpMod = 0f);
223 EMono.player.target =
null;
231 EMono.core.config.game.ignoreWarnCrime = (EMono.core.config.game.ignoreWarnMana = (EMono.core.config.game.ignoreWarnDisassemble = (EMono.core.config.game.ignoreWarnSlaughter =
false)));
233 CellDetail.count = 0;
236 EMono.player.Agent.renderer.isSynced =
true;
244 Popper.scale = (EMono._zone.IsRegion ?
new Vector3(1.7f, 1.7f, 1f) : Vector3.one);
271 EMono.screen.tileMap.activeCount = 0;
299 EMono.player.onStartZone =
null;
301 ActionMode.LastBuildMode =
null;
329 EMono.
ui.widgets.Activate(
"QuestTracker");
367 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(
actionMode.
gameSpeed * 0.75f, 1f, 2f) : 1f);
384 EInput.isShiftDown =
true;
388 EInput.isAltDown =
true;
395 EInput.isShiftDown =
true;
399 EInput.isAltDown =
true;
406 EInput.isShiftDown =
true;
410 EInput.isAltDown =
true;
413 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
434 num = (EInput.wheel = 0);
436 Slider componentOf2 =
InputModuleEX.GetComponentOf<Slider>();
440 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
441 num = (EInput.wheel = 0);
447 if ((
bool)componentOf3)
457 num = (EInput.wheel = 0);
460 if (
EMono.
ui.contextMenu.isActive)
462 Slider componentOf4 =
InputModuleEX.GetComponentOf<Slider>();
463 if ((
bool)componentOf4)
465 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
466 num = (EInput.wheel = 0);
471 if ((
bool)componentOf5)
473 num = (EInput.wheel = 0);
474 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
480 if ((
bool)componentOf6 && componentOf6.onInputWheel !=
null)
483 num = (EInput.wheel = 0);
489 if (layer !=
null && layer.
windows.Count > 0)
494 num = (EInput.wheel = 0);
512 godray.SetActive(enable:
false);
528 srTarget.enabled =
true;
532 srTarget.transform.parent.position = position;
536 srTarget.enabled =
false;
541 EMono.player.pickupDelay = 0f;
568 EMono.player.deathDialog =
true;
569 EMono.player.returnInfo =
null;
570 EMono.player.ignoreFallOver = 1;
575 string lastWord = list.RandomItem();
585 EInput.haltInput =
false;
586 Dialog.
InputName(
"dialogLastword", lastWord, delegate(
bool cancel,
string text)
593 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
596 Net.SendChat(EMono.pc.NameTitled, EMono.player.deathMsg, ChatCategory.Dead, Lang.langCode);
600 Msg.
Say(lastWord.Bracket(1));
601 List<string> list2 =
new List<string>();
608 list2.Add(
"pc_revive_town".lang(lastTown.Name));
610 list2.Add(
"pc_revive");
611 list2.Add(
"pc_gameover");
615 list2.Add(
"pc_gameover");
617 Debug.Log(list2.Count);
620 EMono.ui.CloseLayers();
621 Dialog.List(
"pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
623 EMono.player.deathDialog = false;
624 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
626 EMono.pc.MakeGrave(lastWord);
628 EMono.pc.RecalculateFOV();
629 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
630 if (addTownRevive && c == 0)
634 if (EMono.game.activeZone == zone)
636 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return), silent: true, force: true);
640 EMono.player.deathZoneMove = true;
641 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
643 EMono.screen.FocusPC();
645 if (EMono.player.stats.death == 0)
647 Tutorial.Reserve(
"death");
649 EMono.player.stats.death++;
653 EMono.game.GotoTitle(showDialog: false);
678 EMono.player.wasDirtyWeight =
false;
684 else if (
EMono.
ui.mouseInfo.gameObject.activeSelf)
735 EMono.player.lastTransition =
null;
754 CursorSystem.position.z = -100f;
788 foreach (Transform componentsInDirectChild
in EMono.
ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
790 if (componentsInDirectChild.gameObject.tag !=
"IgnoreDestroy" && !componentsInDirectChild.GetComponent<
TC>())
792 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
804 skyBG.SetActive(bg.
skyBox);
805 skyBG.sharedMaterial = bg.
mat;
806 skyPlane.SetActive(bg.
plane);
807 skyPlane.sharedMaterial = bg.
mat;
808 cam.clearFlags = ((!EMono.core.config.graphic.alwaysClearCamera && bg.
skyBox) ? CameraClearFlags.Depth : CameraClearFlags.Color);
835 ScreenGrading grading = camSupport.
grading;
836 ScreenGradingProfile.Lut lut = grading.lut;
844 lut.tex = Resources.Load<Texture2D>(
"Scene/Profile/Lut/" + conf.
idLut);
850 grading.SetGrading();
857 m.EnableKeyword(
"WAVE_ON");
858 Vector4[] array =
new Vector4[4]
860 new Vector4(-2f, -1f, -1f, 1f),
861 new Vector4(1f, 0f, 1f, 1f),
862 new Vector4(2f, 1f, -1f, 1f),
863 new Vector4(-1f, 0f, 1f, 1f)
865 m.SetVector(
"_WaveDir", array[conf.
seaDir - 1]);
869 m.DisableKeyword(
"WAVE_ON");
969 hideBalloon = !hideBalloon;
970 EMono.
ui.ShowBalloon(!hideBalloon);
999 SoundManager.bgmDumpMod = 0f;
1000 foreach (
ActorEx value
in dictActorEx.Values)
1008 foreach (
ActorEx value
in dictActorEx.Values)
1012 dictActorEx.Clear();
1017 ActorEx actorEx = dictActorEx.TryGetValue(c);
1018 if (!(actorEx !=
null))
1021 onBeforeSetOwner?.Invoke(actorEx);
1023 dictActorEx.Add(c, actorEx);
1029 ActorEx actorEx = dictActorEx.TryGetValue(c);
1030 if (!(actorEx ==
null))
1033 dictActorEx.Remove(c);
1040 for (
int i = 0; i < array.Length; i++)
1051 pivot =
new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1063 for (
int i = 0; i < array.Length; i++)
1071 for (
int i = 0; i < array.Length; i++)
1085 for (
int num = syncList.Count - 1; num >= 0; num--)
1088 if (syncScreen.
Sync != syncFrame)
1091 syncList.RemoveAt(num);
1095 RenderObject.syncFrame = syncFrame;
1100 Transform transform =
Util.Instantiate<Transform>(
"Scene/Prefab/" + id);
1101 transform.name = id;
1102 loadedPrefabs.Add(transform.gameObject);
1108 foreach (GameObject loadedPrefab
in loadedPrefabs)
1110 UnityEngine.Object.Destroy(loadedPrefab);
1112 loadedPrefabs.Clear();
1117 GameObject gameObject = GameObject.Find(
id);
1118 if ((
bool)gameObject)
1120 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)
MeshPass passAutoTileWater
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
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 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)
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)
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