2using System.Collections.Generic;
3using CreativeSpore.SuperTilemapEditor;
49 public ParticleSystem
rain;
51 public ParticleSystem
snow;
131 public List<ISyncScreen>
syncList =
new List<ISyncScreen>();
138 public Dictionary<Card, ActorEx>
dictActorEx =
new Dictionary<Card, ActorEx>();
147 InvokeRepeating(
"RefreshActorEx", 0.5f, 0.5f);
156 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
167 Application.OpenURL(
Lang.
isJP ?
"https://ylvania.org/elin_dev.html" :
"https://ylvania.org/elin_dev_e.html");
174 Debug.Log(
"Scene.Init:" + newMode);
190 SoundManager.bgmVolumeMod = (SoundManager.bgmDumpMod = 0f);
214 EMono.player.target =
null;
222 EMono.core.config.game.ignoreWarnCrime = (EMono.core.config.game.ignoreWarnMana = (EMono.core.config.game.ignoreWarnDisassemble = (EMono.core.config.game.ignoreWarnSlaughter =
false)));
224 CellDetail.count = 0;
227 EMono.player.Agent.renderer.isSynced =
true;
235 Popper.scale = (EMono._zone.IsRegion ?
new Vector3(1.7f, 1.7f, 1f) : Vector3.one);
262 EMono.screen.tileMap.activeCount = 0;
289 EMono.player.onStartZone =
null;
291 ActionMode.LastBuildMode =
null;
319 EMono.
ui.widgets.Activate(
"QuestTracker");
356 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(
actionMode.
gameSpeed * 0.75f, 1f, 2f) : 1f);
373 EInput.isShiftDown =
true;
377 EInput.isAltDown =
true;
384 EInput.isShiftDown =
true;
388 EInput.isAltDown =
true;
395 EInput.isShiftDown =
true;
399 EInput.isAltDown =
true;
402 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
423 num = (EInput.wheel = 0);
425 Slider componentOf2 =
InputModuleEX.GetComponentOf<Slider>();
429 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
430 num = (EInput.wheel = 0);
436 if ((
bool)componentOf3)
446 num = (EInput.wheel = 0);
449 if (
EMono.
ui.contextMenu.isActive)
451 Slider componentOf4 =
InputModuleEX.GetComponentOf<Slider>();
452 if ((
bool)componentOf4)
454 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
455 num = (EInput.wheel = 0);
460 if ((
bool)componentOf5)
462 num = (EInput.wheel = 0);
463 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
469 if ((
bool)componentOf6 && componentOf6.onInputWheel !=
null)
472 num = (EInput.wheel = 0);
478 if (layer !=
null && layer.
windows.Count > 0)
483 num = (EInput.wheel = 0);
501 godray.SetActive(enable:
false);
517 srTarget.enabled =
true;
521 srTarget.transform.parent.position = position;
525 srTarget.enabled =
false;
530 EMono.player.pickupDelay = 0f;
557 EMono.player.deathDialog =
true;
558 EMono.player.returnInfo =
null;
559 EMono.player.ignoreFallOver = 1;
564 string lastWord = list.RandomItem();
574 EInput.haltInput =
false;
575 Dialog.
InputName(
"dialogLastword", lastWord, delegate(
bool cancel,
string text)
582 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
585 Net.SendChat(EMono.pc.NameTitled, EMono.player.deathMsg, ChatCategory.Dead, Lang.langCode);
589 Msg.
Say(lastWord.Bracket(1));
590 List<string> list2 =
new List<string>();
597 list2.Add(
"pc_revive_town".lang(lastTown.Name));
599 list2.Add(
"pc_revive");
600 list2.Add(
"pc_gameover");
604 list2.Add(
"pc_gameover");
606 Debug.Log(list2.Count);
609 EMono.ui.CloseLayers();
610 Dialog.List(
"pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
612 EMono.player.deathDialog = false;
613 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
615 EMono.pc.MakeGrave(lastWord);
617 EMono.pc.RecalculateFOV();
618 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
619 if (addTownRevive && c == 0)
623 if (EMono.game.activeZone == zone)
625 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return), silent: true, force: true);
629 EMono.player.deathZoneMove = true;
630 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
632 EMono.screen.FocusPC();
634 if (EMono.player.stats.death == 0)
636 Tutorial.Reserve(
"death");
638 EMono.player.stats.death++;
642 EMono.game.GotoTitle(showDialog: false);
667 EMono.player.wasDirtyWeight =
false;
673 else if (
EMono.
ui.mouseInfo.gameObject.activeSelf)
723 EMono.player.lastTransition =
null;
742 CursorSystem.position.z = -100f;
776 foreach (Transform componentsInDirectChild
in EMono.
ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
778 if (componentsInDirectChild.gameObject.tag !=
"IgnoreDestroy" && !componentsInDirectChild.GetComponent<
TC>())
780 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
792 skyBG.SetActive(bg.
skyBox);
793 skyBG.sharedMaterial = bg.
mat;
794 skyPlane.SetActive(bg.
plane);
795 skyPlane.sharedMaterial = bg.
mat;
796 cam.clearFlags = ((!EMono.core.config.graphic.alwaysClearCamera && bg.
skyBox) ? CameraClearFlags.Depth : CameraClearFlags.Color);
823 ScreenGrading grading = camSupport.
grading;
824 ScreenGradingProfile.Lut lut = grading.lut;
832 lut.tex = Resources.Load<Texture2D>(
"Scene/Profile/Lut/" + conf.
idLut);
838 grading.SetGrading();
845 m.EnableKeyword(
"WAVE_ON");
846 Vector4[] array =
new Vector4[4]
848 new Vector4(-2f, -1f, -1f, 1f),
849 new Vector4(1f, 0f, 1f, 1f),
850 new Vector4(2f, 1f, -1f, 1f),
851 new Vector4(-1f, 0f, 1f, 1f)
853 m.SetVector(
"_WaveDir", array[conf.
seaDir - 1]);
857 m.DisableKeyword(
"WAVE_ON");
957 hideBalloon = !hideBalloon;
958 EMono.
ui.ShowBalloon(!hideBalloon);
987 SoundManager.bgmDumpMod = 0f;
988 foreach (
ActorEx value
in dictActorEx.Values)
996 foreach (
ActorEx value
in dictActorEx.Values)
1000 dictActorEx.Clear();
1005 ActorEx actorEx = dictActorEx.TryGetValue(c);
1006 if (!(actorEx !=
null))
1009 onBeforeSetOwner?.Invoke(actorEx);
1011 dictActorEx.Add(c, actorEx);
1017 ActorEx actorEx = dictActorEx.TryGetValue(c);
1018 if (!(actorEx ==
null))
1021 dictActorEx.Remove(c);
1028 for (
int i = 0; i < array.Length; i++)
1039 pivot =
new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1051 for (
int i = 0; i < array.Length; i++)
1059 for (
int i = 0; i < array.Length; i++)
1073 for (
int num = syncList.Count - 1; num >= 0; num--)
1076 if (syncScreen.
Sync != syncFrame)
1079 syncList.RemoveAt(num);
1083 RenderObject.syncFrame = syncFrame;
1088 Transform transform =
Util.Instantiate<Transform>(
"Scene/Prefab/" + id);
1089 transform.name = id;
1090 loadedPrefabs.Add(transform.gameObject);
1096 foreach (GameObject loadedPrefab
in loadedPrefabs)
1098 UnityEngine.Object.Destroy(loadedPrefab);
1100 loadedPrefabs.Clear();
1105 GameObject gameObject = GameObject.Find(
id);
1106 if ((
bool)gameObject)
1108 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()
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