2using System.Collections.Generic;
3using CreativeSpore.SuperTilemapEditor;
49 public ParticleSystem
rain;
51 public ParticleSystem
snow;
133 public List<ISyncScreen>
syncList =
new List<ISyncScreen>();
140 public Dictionary<Card, ActorEx>
dictActorEx =
new Dictionary<Card, ActorEx>();
149 InvokeRepeating(
"RefreshActorEx", 0.5f, 0.5f);
158 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
169 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
176 Debug.Log(
"Scene.Init:" + newMode);
192 SoundManager.bgmVolumeMod = (SoundManager.bgmDumpMod = 0f);
216 EMono.player.target =
null;
224 EMono.core.config.game.ignoreWarnCrime = (EMono.core.config.game.ignoreWarnMana = (EMono.core.config.game.ignoreWarnDisassemble = (EMono.core.config.game.ignoreWarnSlaughter =
false)));
226 CellDetail.count = 0;
229 EMono.player.Agent.renderer.isSynced =
true;
237 Popper.scale = (EMono._zone.IsRegion ?
new Vector3(1.7f, 1.7f, 1f) : Vector3.one);
264 EMono.screen.tileMap.activeCount = 0;
291 EMono.player.onStartZone =
null;
293 ActionMode.LastBuildMode =
null;
321 EMono.
ui.widgets.Activate(
"QuestTracker");
358 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(
actionMode.
gameSpeed * 0.75f, 1f, 2f) : 1f);
375 EInput.isShiftDown =
true;
379 EInput.isAltDown =
true;
386 EInput.isShiftDown =
true;
390 EInput.isAltDown =
true;
397 EInput.isShiftDown =
true;
401 EInput.isAltDown =
true;
404 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
425 num = (EInput.wheel = 0);
427 Slider componentOf2 =
InputModuleEX.GetComponentOf<Slider>();
431 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
432 num = (EInput.wheel = 0);
438 if ((
bool)componentOf3)
448 num = (EInput.wheel = 0);
451 if (
EMono.
ui.contextMenu.isActive)
453 Slider componentOf4 =
InputModuleEX.GetComponentOf<Slider>();
454 if ((
bool)componentOf4)
456 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
457 num = (EInput.wheel = 0);
462 if ((
bool)componentOf5)
464 num = (EInput.wheel = 0);
465 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
471 if ((
bool)componentOf6 && componentOf6.onInputWheel !=
null)
474 num = (EInput.wheel = 0);
480 if (layer !=
null && layer.
windows.Count > 0)
485 num = (EInput.wheel = 0);
503 godray.SetActive(enable:
false);
519 srTarget.enabled =
true;
523 srTarget.transform.parent.position = position;
527 srTarget.enabled =
false;
532 EMono.player.pickupDelay = 0f;
559 EMono.player.deathDialog =
true;
560 EMono.player.returnInfo =
null;
561 EMono.player.ignoreFallOver = 1;
566 string lastWord = list.RandomItem();
576 EInput.haltInput =
false;
577 Dialog.
InputName(
"dialogLastword", lastWord, delegate(
bool cancel,
string text)
584 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
587 Net.SendChat(EMono.pc.NameTitled, EMono.player.deathMsg, ChatCategory.Dead, Lang.langCode);
591 Msg.
Say(lastWord.Bracket(1));
592 List<string> list2 =
new List<string>();
599 list2.Add(
"pc_revive_town".lang(lastTown.Name));
601 list2.Add(
"pc_revive");
602 list2.Add(
"pc_gameover");
606 list2.Add(
"pc_gameover");
608 Debug.Log(list2.Count);
611 EMono.ui.CloseLayers();
612 Dialog.List(
"pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
614 EMono.player.deathDialog = false;
615 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
617 EMono.pc.MakeGrave(lastWord);
619 EMono.pc.RecalculateFOV();
620 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
621 if (addTownRevive && c == 0)
625 if (EMono.game.activeZone == zone)
627 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return), silent: true, force: true);
631 EMono.player.deathZoneMove = true;
632 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
634 EMono.screen.FocusPC();
636 if (EMono.player.stats.death == 0)
638 Tutorial.Reserve(
"death");
640 EMono.player.stats.death++;
644 EMono.game.GotoTitle(showDialog: false);
669 EMono.player.wasDirtyWeight =
false;
675 else if (
EMono.
ui.mouseInfo.gameObject.activeSelf)
726 EMono.player.lastTransition =
null;
745 CursorSystem.position.z = -100f;
779 foreach (Transform componentsInDirectChild
in EMono.
ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
781 if (componentsInDirectChild.gameObject.tag !=
"IgnoreDestroy" && !componentsInDirectChild.GetComponent<
TC>())
783 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
795 skyBG.SetActive(bg.
skyBox);
796 skyBG.sharedMaterial = bg.
mat;
797 skyPlane.SetActive(bg.
plane);
798 skyPlane.sharedMaterial = bg.
mat;
799 cam.clearFlags = ((!EMono.core.config.graphic.alwaysClearCamera && bg.
skyBox) ? CameraClearFlags.Depth : CameraClearFlags.Color);
826 ScreenGrading grading = camSupport.
grading;
827 ScreenGradingProfile.Lut lut = grading.lut;
835 lut.tex = Resources.Load<Texture2D>(
"Scene/Profile/Lut/" + conf.
idLut);
841 grading.SetGrading();
848 m.EnableKeyword(
"WAVE_ON");
849 Vector4[] array =
new Vector4[4]
851 new Vector4(-2f, -1f, -1f, 1f),
852 new Vector4(1f, 0f, 1f, 1f),
853 new Vector4(2f, 1f, -1f, 1f),
854 new Vector4(-1f, 0f, 1f, 1f)
856 m.SetVector(
"_WaveDir", array[conf.
seaDir - 1]);
860 m.DisableKeyword(
"WAVE_ON");
960 hideBalloon = !hideBalloon;
961 EMono.
ui.ShowBalloon(!hideBalloon);
990 SoundManager.bgmDumpMod = 0f;
991 foreach (
ActorEx value
in dictActorEx.Values)
999 foreach (
ActorEx value
in dictActorEx.Values)
1003 dictActorEx.Clear();
1008 ActorEx actorEx = dictActorEx.TryGetValue(c);
1009 if (!(actorEx !=
null))
1012 onBeforeSetOwner?.Invoke(actorEx);
1014 dictActorEx.Add(c, actorEx);
1020 ActorEx actorEx = dictActorEx.TryGetValue(c);
1021 if (!(actorEx ==
null))
1024 dictActorEx.Remove(c);
1031 for (
int i = 0; i < array.Length; i++)
1042 pivot =
new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1054 for (
int i = 0; i < array.Length; i++)
1062 for (
int i = 0; i < array.Length; i++)
1076 for (
int num = syncList.Count - 1; num >= 0; num--)
1079 if (syncScreen.
Sync != syncFrame)
1082 syncList.RemoveAt(num);
1086 RenderObject.syncFrame = syncFrame;
1091 Transform transform =
Util.Instantiate<Transform>(
"Scene/Prefab/" + id);
1092 transform.name = id;
1093 loadedPrefabs.Add(transform.gameObject);
1099 foreach (GameObject loadedPrefab
in loadedPrefabs)
1101 UnityEngine.Object.Destroy(loadedPrefab);
1103 loadedPrefabs.Clear();
1108 GameObject gameObject = GameObject.Find(
id);
1109 if ((
bool)gameObject)
1111 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()
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
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