Elin Decompiled Documentation EA 23.356.1 Nightly
Loading...
Searching...
No Matches
Scene Class Reference
Inheritance diagram for Scene:
EMono

Public Types

enum  Mode { None , Title , StartGame , Zone }
 

Public Member Functions

void TryWarnMacScreen ()
 
void TryWarnLinuxMod ()
 
void Init (Mode newMode)
 
void OnKillGame ()
 
void Clear ()
 
void OnUpdate ()
 
void OnLateUpdate ()
 
void UpdateCursor ()
 
void UpdateTimeRatio ()
 
void OnChangeHour ()
 
void RefreshBG ()
 
void FocusAndPause (Point pos, int a)
 
void ApplyZoneConfig ()
 
void OnToggle ()
 
void ToggleShowRoof ()
 
void ToggleLight ()
 
void ToggleSnapFreePos ()
 
void ToggleFreePos ()
 
void ToggleShowWall ()
 
void ToggleRoof ()
 
void ToggleSlope ()
 
void ToggleTilt ()
 
void ToggleHighlightArea ()
 
void ToggleBirdView (bool sound=true)
 
void ToggleBalloon ()
 
void ToggleMuteBGM ()
 
void RebuildActorEx ()
 
void RefreshActorEx ()
 
void ClearActorEx ()
 
void AddActorEx (Card c, Action< ActorEx > onBeforeSetOwner=null)
 
void RemoveActorEx (Card c)
 
void InitPass ()
 
void DrawPass ()
 
void RefreshSync ()
 
Transform LoadPrefab (string id)
 
void DestroyPrefabs ()
 
void DestroyPrefab (string id)
 

Public Attributes

Vector2[] test
 
Transform transFocus
 
Transform transBlizzard
 
Transform transAudio
 
Vector3 posAudioListener
 
AudioListener audioListener
 
Camera cam
 
Camera camTreasure
 
CameraSupport camSupport
 
VFX firefly
 
VFX fireflyNight
 
VFX star
 
ParticleSystem rain
 
ParticleSystem snow
 
ParticleSystem ether
 
ParticleSystem godray
 
ParticleSystem godrayDust
 
ParticleSystem blossom
 
ParticleSystem etherBlossom
 
ParticleSystem bubble
 
ParticleSystem[] blossoms
 
ParticleSystem[] blizzards
 
FlockController flock
 
MeshRenderer skyBG
 
MeshRenderer skyPlane
 
SceneProfile profile
 
CameraFilterPack_Atmosphere_Rain filterRain
 
ActionMode actionMode
 
SoundSource sfxRain
 
SoundSource sfxWind
 
SoundSource sfxUnderwater
 
SoundSource sfxSea
 
SoundSource sfxFire
 
SoundSource sfxEther
 
GameScreen screenElin
 
GameScreenElona screenElona
 
GameScreenNoMap screenNoMap
 
PopperManager popper
 
EloMapActor elomapActor
 
SpriteRenderer srTarget
 
Tileset tileset
 
Material matFloorEx
 
DamageTextRenderer damageTextRenderer = new DamageTextRenderer()
 
ParticleSystem psFoot
 
ParticleSystem psSmoke
 
ParticleSystem psRainSplash
 
ParticleSystem psRainSplashWater
 
ParticleSystem psFey
 
MeshPass[] passes
 
GameSetting.RenderSetting.MapBGSetting bg
 
Mode mode
 
float timeRatio
 
List< GameObject > loadedPrefabs = new List<GameObject>()
 
PointTarget mouseTarget = new PointTarget()
 
List< ISyncScreen > syncList = new List<ISyncScreen>()
 
bool paused
 
long syncFrame
 
Dictionary< Card, ActorEx > dictActorEx = new Dictionary<Card, ActorEx>()
 
bool hideBalloon
 

Static Public Attributes

static bool isAnnounced
 
static Point HitPoint = new Point()
 
static Point ClickPoint = new Point()
 
static bool skipAnime
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

EloMap elomap [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void Awake ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Detailed Description

Definition at line 7 of file Scene.cs.

Member Enumeration Documentation

◆ Mode

enum Scene.Mode
Enumerator
None 
Title 
StartGame 
Zone 

Definition at line 9 of file Scene.cs.

10 {
11 None,
12 Title,
14 Zone
15 }
Definition: Zone.cs:12

Member Function Documentation

◆ AddActorEx()

void Scene.AddActorEx ( Card  c,
Action< ActorEx >  onBeforeSetOwner = null 
)
inline

Definition at line 1021 of file Scene.cs.

1022 {
1023 ActorEx actorEx = dictActorEx.TryGetValue(c);
1024 if (!(actorEx != null))
1025 {
1026 actorEx = Util.Instantiate<ActorEx>("Scene/Render/Actor/Ex/" + c.trait.IDActorEx);
1027 onBeforeSetOwner?.Invoke(actorEx);
1028 actorEx.SetOwner(c);
1029 dictActorEx.Add(c, actorEx);
1030 }
1031 }
void SetOwner(Card c)
Definition: ActorEx.cs:38
Trait trait
Definition: Card.cs:54
Dictionary< Card, ActorEx > dictActorEx
Definition: Scene.cs:144
virtual string IDActorEx
Definition: Trait.cs:187
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References Trait.IDActorEx, ActorEx.SetOwner(), Card.trait, and Util.

Referenced by Map._AddCard(), TraitJukeBox.OnToggle(), and TraitRadio.OnUse().

◆ ApplyZoneConfig()

void Scene.ApplyZoneConfig ( )
inline

Definition at line 829 of file Scene.cs.

830 {
831 MapConfig conf;
833 {
834 conf = EMono._map.config;
838 SetOcean(tileMap.passLiquid.mat);
839 SetOcean(tileMap.passFloorWater.mat);
840 SetOcean(tileMap.passAutoTileWater.mat);
841 ScreenGrading grading = camSupport.grading;
842 ScreenGradingProfile.Lut lut = grading.lut;
843 grading.profile.funcOverlay = () => EMono.scene.profile.overlay;
844 if (conf.idLut == "None")
845 {
846 lut.tex = null;
847 }
848 else
849 {
850 lut.tex = Resources.Load<Texture2D>("Scene/Profile/Lut/" + conf.idLut);
851 lut.Brightness = conf.lutBrightness;
852 lut.Saturation = conf.lutSaturation;
853 lut.Contrast = conf.lutContrast;
854 lut.blend = conf.lutBlend;
855 }
856 grading.SetGrading();
857 }
858 void SetOcean(Material m)
859 {
860 m.SetFloat("_GradientWater", EMono.core.config.graphic.gradientWater ? EMono.core.config.graphic.gradientWaterLevel : 0f);
861 if (conf.seaDir != 0)
862 {
863 m.EnableKeyword("WAVE_ON");
864 Vector4[] array = new Vector4[4]
865 {
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)
870 };
871 m.SetVector("_WaveDir", array[conf.seaDir - 1]);
872 }
873 else
874 {
875 m.DisableKeyword("WAVE_ON");
876 }
877 }
878 }
if(!match.Success)
BaseTileMap tileMap
MeshPass passAutoTileWater
Definition: BaseTileMap.cs:177
MeshPass passFloorWater
Definition: BaseTileMap.cs:165
MeshPass passLiquid
Definition: BaseTileMap.cs:135
ScreenGrading grading
GraphicSetting graphic
Definition: CoreConfig.cs:627
bool IsGameStarted
Definition: Core.cs:87
CoreConfig config
Definition: Core.cs:70
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
static Scene scene
Definition: EMono.cs:27
static Map _map
Definition: EMono.cs:17
static void Apply(string id)
string idLut
Definition: MapConfig.cs:17
string idLiquid
Definition: MapConfig.cs:14
float lutContrast
Definition: MapConfig.cs:68
float lutSaturation
Definition: MapConfig.cs:71
int seaDir
Definition: MapConfig.cs:92
float lutBrightness
Definition: MapConfig.cs:65
string idRefraction
Definition: MapConfig.cs:20
float lutBlend
Definition: MapConfig.cs:62
MapConfig config
Definition: Map.cs:40
Material mat
Definition: MeshPass.cs:21
static void Apply(string id)
OverlayProfile overlay
Definition: SceneProfile.cs:8
GameScreen screenElin
Definition: Scene.cs:93
CameraSupport camSupport
Definition: Scene.cs:41
SceneProfile profile
Definition: Scene.cs:75

References EMono._map, LiquidProfile.Apply(), RefractionProfile.Apply(), Core.config, Map.config, EMono.core, CoreConfig.GraphicSetting.gradientWater, CoreConfig.GraphicSetting.gradientWaterLevel, CameraSupport.grading, CoreConfig.graphic, MapConfig.idLiquid, MapConfig.idLut, MapConfig.idRefraction, if(), Core.IsGameStarted, MapConfig.lutBlend, MapConfig.lutBrightness, MapConfig.lutContrast, MapConfig.lutSaturation, MeshPass.mat, Material, SceneProfile.overlay, BaseTileMap.passAutoTileWater, BaseTileMap.passFloorWater, BaseTileMap.passLiquid, profile, EMono.scene, MapConfig.seaDir, and BaseGameScreen.tileMap.

Referenced by BaseGameScreen.Activate(), WidgetSceneCustomizer.OnActivate(), TextureManager.RefreshTextures(), and WidgetSceneCustomizer.ShowPicker().

◆ Awake()

void Scene.Awake ( )
inlineprivate

Definition at line 151 of file Scene.cs.

152 {
153 InvokeRepeating("RefreshActorEx", 0.5f, 0.5f);
154 }

◆ Clear()

void Scene.Clear ( )
inline

Definition at line 354 of file Scene.cs.

355 {
356 foreach (ISyncScreen sync in syncList)
357 {
358 sync.OnLeaveScreen();
359 }
360 syncList.Clear();
362 ClearActorEx();
364 }
static EffectManager Instance
List< ISyncScreen > syncList
Definition: Scene.cs:137
void ClearActorEx()
Definition: Scene.cs:1012
void DestroyPrefabs()
Definition: Scene.cs:1112
void OnLeaveScreen()

References ClearActorEx(), DestroyPrefabs(), EffectManager.Instance, EffectManager.KillAll(), ISyncScreen.OnLeaveScreen(), and syncList.

Referenced by Zone.Deactivate(), and OnKillGame().

◆ ClearActorEx()

void Scene.ClearActorEx ( )
inline

Definition at line 1012 of file Scene.cs.

1013 {
1014 foreach (ActorEx value in dictActorEx.Values)
1015 {
1016 value.Kill();
1017 }
1018 dictActorEx.Clear();
1019 }
void Kill()
Definition: ActorEx.cs:164

References ActorEx.Kill().

Referenced by Clear().

◆ DestroyPrefab()

void Scene.DestroyPrefab ( string  id)
inline

Definition at line 1121 of file Scene.cs.

1122 {
1123 GameObject gameObject = GameObject.Find(id);
1124 if ((bool)gameObject)
1125 {
1126 UnityEngine.Object.DestroyImmediate(gameObject);
1127 }
1128 }

◆ DestroyPrefabs()

void Scene.DestroyPrefabs ( )
inline

Definition at line 1112 of file Scene.cs.

1113 {
1114 foreach (GameObject loadedPrefab in loadedPrefabs)
1115 {
1116 UnityEngine.Object.Destroy(loadedPrefab);
1117 }
1118 loadedPrefabs.Clear();
1119 }
List< GameObject > loadedPrefabs
Definition: Scene.cs:133

Referenced by Clear().

◆ DrawPass()

void Scene.DrawPass ( )
inline

Definition at line 1064 of file Scene.cs.

1065 {
1066 if (cam.enabled)
1067 {
1068 MeshPass[] array = passes;
1069 for (int i = 0; i < array.Length; i++)
1070 {
1071 array[i].Draw();
1072 }
1073 }
1074 else
1075 {
1076 MeshPass[] array = passes;
1077 for (int i = 0; i < array.Length; i++)
1078 {
1079 array[i].DrawEmpty();
1080 }
1081 }
1082 RefreshSync();
1083 if ((bool)EMono.screen.guide)
1084 {
1086 }
1087 }
ScreenGuide guide
static BaseGameScreen screen
Definition: EMono.cs:29
void Draw()
Definition: MeshPass.cs:350
void DrawEmpty()
Definition: MeshPass.cs:412
Camera cam
Definition: Scene.cs:37
MeshPass[] passes
Definition: Scene.cs:121
void RefreshSync()
Definition: Scene.cs:1089
void OnDrawPass()
Definition: ScreenGuide.cs:33

References MeshPass.Draw(), MeshPass.DrawEmpty(), BaseGameScreen.guide, ScreenGuide.OnDrawPass(), and EMono.screen.

◆ FocusAndPause()

void Scene.FocusAndPause ( Point  pos,
int  a 
)
inline

Definition at line 817 of file Scene.cs.

818 {
819 if (a >= 1)
820 {
821 EMono.core.screen.Focus(pos);
822 }
823 if (a >= 2)
824 {
826 }
827 }
static AM_Sim Sim
Definition: ActionMode.cs:11
void Pause(bool sound=false)
Definition: ActionMode.cs:1502
void Focus(Int3 ints)
BaseGameScreen screen
Definition: Core.cs:67

References EMono.core, BaseGameScreen.Focus(), ActionMode.Pause(), Core.screen, and ActionMode.Sim.

◆ Init()

void Scene.Init ( Mode  newMode)
inline

Definition at line 178 of file Scene.cs.

179 {
180 Debug.Log("Scene.Init:" + newMode);
181 EMono.ui.RemoveLayers();
184 BaseModManager.PublishEvent("elin.scene.pre_init", newMode);
185 mode = newMode;
186 switch (newMode)
187 {
188 case Mode.None:
189 if (EMono.game != null)
190 {
191 EMono.game.Kill();
192 }
193 EMono.ui.RemoveLayers();
195 break;
196 case Mode.Title:
197 SoundManager.bgmVolumeMod = (SoundManager.bgmDumpMod = 0f);
198 if (EMono.game != null)
199 {
200 EMono.game.Kill();
201 }
202 EMono.ui.AddLayer<LayerTitle>();
203 if (!isAnnounced || Application.isEditor)
204 {
205 isAnnounced = true;
207 {
208 EMono.ui.AddLayer("LayerAnnounce").SetOnKill(TryWarnMacScreen);
209 });
210 }
211 else
212 {
214 }
217 break;
218 case Mode.StartGame:
219 EMono.ui.RemoveLayer<LayerTitle>();
220 EMono.ui.ShowCover();
221 Init(Mode.Zone);
222 break;
223 case Mode.Zone:
224 EMono.player.target = null;
225 UIBook.str_pc = EMono.pc.NameSimple;
226 if (EMono.player.zone == null)
227 {
228 Player obj = EMono.player;
229 Zone zone = (EMono.pc.currentZone = EMono.pc.homeZone);
230 obj.zone = zone;
231 }
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;
235 skipAnime = true;
236 EMono.player.baseActTime = EMono.setting.defaultActPace;
237 EMono.player.Agent.renderer.isSynced = true;
238 EMono.player.Agent.currentZone = EMono.player.zone;
239 Point._screen = (EMono.player.zone.IsRegion ? ((BaseGameScreen)screenElona) : ((BaseGameScreen)screenElin));
245 Popper.scale = (EMono._zone.IsRegion ? new Vector3(1.7f, 1.7f, 1f) : Vector3.one);
247 {
249 }
250 else if (EMono.player.zone is Region)
251 {
253 }
254 else
255 {
257 }
258 if (EMono.game.altCraft)
259 {
260 if (EMono._zone.IsRegion)
261 {
262 if ((bool)EMono.ui.layerFloat.GetLayer<LayerCraftFloat>())
263 {
264 EMono.ui.layerFloat.RemoveLayer<LayerCraftFloat>();
265 }
266 }
267 else if (!EMono.ui.layerFloat.GetLayer<LayerCraftFloat>())
268 {
269 EMono.ui.layerFloat.AddLayer<LayerCraftFloat>();
270 }
271 }
272 EMono.screen.tileMap.activeCount = 0;
280 if (EMono.ui.hud.imageCover.gameObject.activeSelf && !EMono.player.simulatingZone)
281 {
282 EMono.ui.HideCover(4f);
283 }
285 {
286 EMono.game.Save();
287 }
288 foreach (Thing thing in EMono._map.things)
289 {
290 if (thing.IsInstalled)
291 {
292 thing.trait.TryToggle();
293 }
294 }
296 camSupport.water.enabled = EMono._zone.IsUnderwater;
297 if (EMono.player.onStartZone != null)
298 {
300 EMono.player.onStartZone = null;
301 }
302 ActionMode.LastBuildMode = null;
303 if (ActionMode.Adv.IsActive && (EInput.leftMouse.pressing || EInput.axis != Vector2.zero))
304 {
308 }
310 {
312 }
313 flock.SetSpawnType(EMono._zone.FlockType);
315 {
317 if (EMono._zone == EMono.pc.homeZone)
318 {
319 EMono.pc.faith.Revelation("welcome", EMono.pc);
320 }
321 if (EMono._zone.Boss != null && EMono._zone.Boss.ExistsOnMap)
322 {
324 }
326 }
328 if (EMono.player.questTracker && !EMono.ui.widgets.GetWidget("QuestTracker"))
329 {
330 EMono.ui.widgets.Activate("QuestTracker");
331 }
332 if ((EMono._zone is Zone_Town || EMono._zone is Zone_Tent) && !EMono._zone.isMapSaved && !EMono.debug.ignoreAutoSave)
333 {
334 EMono.game.Save();
335 }
336 break;
337 }
338 etherBlossom.SetActive(mode == Mode.Zone && EMono._zone is Zone_WindRest);
339 bubble.SetActive(mode == Mode.Zone && EMono._zone.IsUnderwater);
340 BaseModManager.PublishEvent("elin.scene.post_init", newMode);
341 }
void SetPressedAction(ButtonState button)
Definition: AM_Adv.cs:1213
void SetManualMove()
Definition: AM_Adv.cs:1203
virtual void RefreshArrow()
Definition: AM_Adv.cs:1375
static AM_Title Title
Definition: ActionMode.cs:9
static AM_Region Region
Definition: ActionMode.cs:17
void Activate(bool toggle=true, bool forceActivate=false)
Definition: ActionMode.cs:339
bool IsActive
Definition: ActionMode.cs:121
static AM_ViewZone View
Definition: ActionMode.cs:13
static AM_Adv Adv
Definition: ActionMode.cs:15
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
void SetZoom(float z)
virtual float TargetZoom
static void PublishEvent(string eventId, object data=null)
static void Deactivate()
Definition: BuildMenu.cs:173
bool pressing
Definition: ButtonState.cs:35
bool ExistsOnMap
Definition: Card.cs:2137
void RecalculateFOV()
Definition: Card.cs:6862
Point pos
Definition: Card.cs:60
bool IsInstalled
Definition: Card.cs:2451
string NameSimple
Definition: Card.cs:2193
override bool IsAliveInCurrentZone
Definition: Chara.cs:569
string NameBraced
Definition: Chara.cs:522
Zone homeZone
Definition: Chara.cs:273
Religion faith
Definition: Chara.cs:445
bool IsInActiveZone
Definition: Chara.cs:887
new GameConfig game
Definition: CoreConfig.cs:629
void ApplyGrading()
Definition: CoreConfig.cs:989
bool ignoreAutoSave
Definition: CoreDebug.cs:142
CoreDebug debug
Definition: Core.cs:31
Definition: EInput.cs:8
static Vector2 axis
Definition: EInput.cs:342
static ButtonState leftMouse
Definition: EInput.cs:360
static KeyboardPress keyWait
Definition: EInput.cs:262
static GameSetting setting
Definition: EMono.cs:31
static Chara pc
Definition: EMono.cs:13
static World world
Definition: EMono.cs:37
static Player player
Definition: EMono.cs:11
static Zone _zone
Definition: EMono.cs:19
static Game game
Definition: EMono.cs:7
static UI ui
Definition: EMono.cs:15
static CoreDebug debug
Definition: EMono.cs:45
float defaultActPace
Definition: GameSetting.cs:374
void Reset()
Definition: GameUpdater.cs:383
RecipeUpdater recipe
Definition: GameUpdater.cs:371
int countLoadedMaps
Definition: Game.cs:236
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1090
void Kill()
Definition: Game.cs:1163
GameUpdater updater
Definition: Game.cs:250
QuestManager quests
Definition: Game.cs:183
bool altCraft
Definition: Game.cs:272
void ResetHotbar(int id)
Definition: HotbarManager.cs:8
List< Thing > things
Definition: Map.cs:52
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void OnEnterZone()
Definition: Player.cs:861
Definition: Player.cs:11
Flags flags
Definition: Player.cs:1164
Action onStartZone
Definition: Player.cs:1292
bool questTracker
Definition: Player.cs:1059
Zone zone
Definition: Player.cs:1152
bool simulatingZone
Definition: Player.cs:1252
void RefreshEmptyAlly()
Definition: Player.cs:1690
void RefreshCurrentHotItem()
Definition: Player.cs:2297
HotbarManager hotbars
Definition: Player.cs:1155
void OnEnterZone()
void Build(Point _p, Mode _mode=Mode.Passive)
Definition: Region.cs:8
virtual void Revelation(string idTalk, Card c, int chance=100)
Definition: Religion.cs:167
Mode mode
Definition: Scene.cs:127
static bool skipAnime
Definition: Scene.cs:25
void TryWarnMacScreen()
Definition: Scene.cs:156
ParticleSystem bubble
Definition: Scene.cs:63
static bool isAnnounced
Definition: Scene.cs:19
ParticleSystem etherBlossom
Definition: Scene.cs:61
GameScreenNoMap screenNoMap
Definition: Scene.cs:97
FlockController flock
Definition: Scene.cs:69
GameScreenElona screenElona
Definition: Scene.cs:95
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
void UpdateTimeRatio()
Definition: Scene.cs:772
static void Reset()
Definition: ScreenFlash.cs:18
virtual bool IsRegion
Definition: Spatial.cs:515
virtual string Name
Definition: Spatial.cs:509
Definition: Thing.cs:8
virtual void TryToggle()
Definition: Trait.cs:1339
void RefreshWeather()
Definition: Weather.cs:168
static void Refresh()
Definition: WidgetDate.cs:190
static void OnChangeMode()
Weather weather
Definition: World.cs:12
void Activate()
Definition: Zone.cs:639
virtual FlockController.SpawnType FlockType
Definition: Zone.cs:422
Chara Boss
Definition: Zone.cs:91
virtual bool IsUnderwater
Definition: Zone.cs:276

References EMono._map, EMono._zone, BaseGameScreen.Activate(), Zone.Activate(), ActionMode.Activate(), ActionMode.Adv, Game.altCraft, CoreConfig.ApplyGrading(), CoreConfig.GameConfig.autoSave, EInput.axis, Zone.Boss, bubble, RecipeUpdater.Build(), Core.config, EInput.KeyboardPress.Consume(), EMono.core, Game.countLoadedMaps, BaseGameScreen.Deactivate(), BuildMenu.Deactivate(), Core.debug, EMono.debug, Debug, GameSetting.defaultActPace, etherBlossom, Card.ExistsOnMap, Chara.faith, Player.flags, flock, Zone.FlockType, BaseGameScreen.FocusPC(), CoreConfig.game, EMono.game, Chara.homeZone, Player.hotbars, CoreDebug.ignoreAutoSave, Init(), ActionMode.IsActive, Chara.IsAliveInCurrentZone, isAnnounced, Chara.IsInActiveZone, Card.IsInstalled, Spatial.IsRegion, Zone.IsUnderwater, EInput.keyWait, Game.Kill(), EInput.leftMouse, mode, Spatial.Name, Chara.NameBraced, Card.NameSimple, WidgetMenuPanel.OnChangeMode(), Player.Flags.OnEnterZone(), QuestManager.OnEnterZone(), Player.onStartZone, EMono.pc, EMono.player, Card.pos, ButtonState.pressing, BaseModManager.PublishEvent(), Game.quests, Player.questTracker, Card.RecalculateFOV(), GameUpdater.recipe, WidgetDate.Refresh(), AM_Adv.RefreshArrow(), Player.RefreshCurrentHotItem(), Player.RefreshEmptyAlly(), Weather.RefreshWeather(), ActionMode.Region, GameUpdater.Reset(), ScreenFlash.Reset(), HotbarManager.ResetHotbar(), Religion.Revelation(), Game.Save(), Msg.Say(), EMono.screen, screenElin, screenElona, screenNoMap, AM_Adv.SetManualMove(), AM_Adv.SetPressedAction(), EMono.setting, BaseGameScreen.SetZoom(), Player.simulatingZone, skipAnime, BaseGameScreen.TargetZoom, Map.things, ActionMode.Title, Card.trait, Trait.TryToggle(), TryWarnMacScreen(), EMono.ui, Game.updater, UpdateTimeRatio(), ActionMode.View, BaseCore.WaitForEndOfFrame(), World.weather, EMono.world, and Player.zone.

Referenced by AM_Adv._OnUpdateInput(), Game.GotoTitle(), Init(), Game.Load(), Player.MoveZone(), Map.Reload(), Player.SimulateFaction(), Game.StartNewGame(), and CoreDebug.UpdateInput().

◆ InitPass()

void Scene.InitPass ( )
inline

Definition at line 1043 of file Scene.cs.

1044 {
1045 MeshPass[] array = passes;
1046 for (int i = 0; i < array.Length; i++)
1047 {
1048 array[i].Init();
1049 }
1050 foreach (ModItem<Sprite> item in MOD.sprites.list)
1051 {
1052 Sprite sprite = SpriteSheet.Get(item.id);
1053 if ((bool)sprite)
1054 {
1055 Sprite value = item.GetObject(new SpriteLoadOption
1056 {
1057 pivot = new Vector2(sprite.pivot.x / (sprite.bounds.size.x * 100f), sprite.pivot.y / (sprite.bounds.size.y * 100f))
1058 });
1059 SpriteSheet.dict[item.id] = value;
1060 }
1061 }
1062 }
Definition: MOD.cs:7
static ModItemList< Sprite > sprites
Definition: MOD.cs:22
void Init()
Definition: MeshPass.cs:98
List< ModItem< T > > list
Definition: ModItemList.cs:9
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
static Dictionary< string, Sprite > dict
Definition: SpriteSheet.cs:6

References SpriteSheet.dict, SpriteSheet.Get(), MeshPass.Init(), item, ModItemList< T >.list, and MOD.sprites.

◆ LoadPrefab()

Transform Scene.LoadPrefab ( string  id)
inline

Definition at line 1104 of file Scene.cs.

1105 {
1106 Transform transform = Util.Instantiate<Transform>("Scene/Prefab/" + id);
1107 transform.name = id;
1108 loadedPrefabs.Add(transform.gameObject);
1109 return transform;
1110 }

References Util.

Referenced by Zone_Olvina.OnActivate(), and Zone_SisterHouse.OnActivate().

◆ OnChangeHour()

void Scene.OnChangeHour ( )
inline

Definition at line 782 of file Scene.cs.

783 {
788 if ((bool)EMono.screen.pcOrbit)
789 {
791 }
794 foreach (Transform componentsInDirectChild in EMono.ui.rectDynamic.GetComponentsInDirectChildren<Transform>())
795 {
796 if (componentsInDirectChild.gameObject.tag != "IgnoreDestroy" && !componentsInDirectChild.GetComponent<TC>())
797 {
798 UnityEngine.Object.Destroy(componentsInDirectChild.gameObject);
799 }
800 }
801 }
virtual void OnChangeHour()
void OnChangeMin()
Definition: PCOrbit.cs:19
VFX fireflyNight
Definition: Scene.cs:45
VFX firefly
Definition: Scene.cs:43
VFX star
Definition: Scene.cs:47
Definition: TC.cs:4
void OnChangeHour()
Definition: VFX.cs:15

References BaseGameScreen.OnChangeHour(), VFX.OnChangeHour(), PCOrbit.OnChangeMin(), BaseGameScreen.pcOrbit, BaseGameScreen.RefreshSky(), EMono.screen, and EMono.ui.

Referenced by BaseGameScreen.Activate(), and GameDate.AdvanceHour().

◆ OnKillGame()

void Scene.OnKillGame ( )
inline

Definition at line 343 of file Scene.cs.

344 {
347 actionMode = null;
348 PCC.PurgeCache();
349 Clear();
350 flock.Reset();
352 }
void Deactivate()
Definition: ActionMode.cs:529
void OnKillGame()
Definition: EloMapActor.cs:88
void Clear()
Definition: PointTarget.cs:220
EloMapActor elomapActor
Definition: Scene.cs:101
void Clear()
Definition: Scene.cs:354
ActionMode actionMode
Definition: Scene.cs:79
PointTarget mouseTarget
Definition: Scene.cs:135

References actionMode, PointTarget.Clear(), Clear(), ActionMode.Deactivate(), elomapActor, flock, mouseTarget, and EloMapActor.OnKillGame().

Referenced by Game.Kill().

◆ OnLateUpdate()

void Scene.OnLateUpdate ( )
inline

Definition at line 751 of file Scene.cs.

752 {
753 DrawPass();
755 }
static CursorSystem Instance
Definition: CursorSystem.cs:6
void DrawPass()
Definition: Scene.cs:1064

References CursorSystem.Draw(), and CursorSystem.Instance.

Referenced by Core.LateUpdate().

◆ OnToggle()

void Scene.OnToggle ( )
inline

◆ OnUpdate()

void Scene.OnUpdate ( )
inline

Definition at line 366 of file Scene.cs.

367 {
368 SoundManager.speed = (EMono.core.IsGameStarted ? Mathf.Clamp(actionMode.gameSpeed * 0.75f, 1f, 2f) : 1f);
370 EMono.ui.RefreshActiveState();
371 bool isShiftDown = EInput.isShiftDown;
372 if ((bool)UIDropdown.activeInstance)
373 {
375 }
376 else
377 {
378 EInput.Update();
379 }
382 {
383 if (input.middleClick == CoreConfig.GameFunc.EmuShift || input.middlePressLong == CoreConfig.GameFunc.EmuShift)
384 {
385 EInput.isShiftDown = true;
386 }
387 if (input.middleClick == CoreConfig.GameFunc.EmuAlt || input.middlePressLong == CoreConfig.GameFunc.EmuAlt)
388 {
389 EInput.isAltDown = true;
390 }
391 }
393 {
394 if (input.mouse3Click == CoreConfig.GameFunc.EmuShift || input.mouse3PressLong == CoreConfig.GameFunc.EmuShift)
395 {
396 EInput.isShiftDown = true;
397 }
398 if (input.mouse3Click == CoreConfig.GameFunc.EmuAlt || input.mouse3PressLong == CoreConfig.GameFunc.EmuAlt)
399 {
400 EInput.isAltDown = true;
401 }
402 }
404 {
405 if (input.mouse4Click == CoreConfig.GameFunc.EmuShift || input.mouse4PressLong == CoreConfig.GameFunc.EmuShift)
406 {
407 EInput.isShiftDown = true;
408 }
409 if (input.mouse4Click == CoreConfig.GameFunc.EmuAlt || input.mouse4PressLong == CoreConfig.GameFunc.EmuAlt)
410 {
411 EInput.isAltDown = true;
412 }
413 }
414 EInput.hasShiftChanged = EInput.isShiftDown != isShiftDown;
415 Layer.cancelKeyDown = EInput.isCancel;
416 Layer.rightClicked = EInput.rightMouse.down;
417 int num = EInput.wheel;
418 if (num != 0)
419 {
420 if (EMono.ui.isPointerOverUI)
421 {
422 if (!EMono.ui.GetLayer<LayerConfig>() && !EMono.ui.GetLayer<LayerModConfig>())
423 {
424 UIDropdown componentOf = InputModuleEX.GetComponentOf<UIDropdown>();
425 if ((bool)componentOf && !UIDropdown.activeInstance)
426 {
427 if (num < 0)
428 {
429 componentOf.Next();
430 }
431 else if (num > 0)
432 {
433 componentOf.Prev();
434 }
435 num = (EInput.wheel = 0);
436 }
437 Slider componentOf2 = InputModuleEX.GetComponentOf<Slider>();
438 if ((bool)componentOf2 && (bool)EMono.ui.GetLayer<LayerEditPCC>())
439 {
440 SE.Tab();
441 componentOf2.value += (componentOf2.wholeNumbers ? ((float)num) : (0.1f * (float)num));
442 num = (EInput.wheel = 0);
443 }
444 }
446 {
447 DropdownGrid componentOf3 = InputModuleEX.GetComponentOf<DropdownGrid>();
448 if ((bool)componentOf3)
449 {
450 if (num < 0)
451 {
452 componentOf3.Next();
453 }
454 else if (num > 0)
455 {
456 componentOf3.Prev();
457 }
458 num = (EInput.wheel = 0);
459 }
460 }
461 if (EMono.ui.contextMenu.isActive)
462 {
463 Slider componentOf4 = InputModuleEX.GetComponentOf<Slider>();
464 if ((bool)componentOf4)
465 {
466 componentOf4.value += (componentOf4.wholeNumbers ? ((float)num) : (0.1f * (float)num));
467 num = (EInput.wheel = 0);
468 SE.Tab();
469 }
470 }
471 UIScrollView componentOf5 = InputModuleEX.GetComponentOf<UIScrollView>();
472 if ((bool)componentOf5)
473 {
474 num = (EInput.wheel = 0);
475 if (componentOf5.verticalScrollbar.isActiveAndEnabled)
476 {
477 EMono.ui.HideMouseHint();
478 }
479 }
480 UIButton componentOf6 = InputModuleEX.GetComponentOf<UIButton>();
481 if ((bool)componentOf6 && componentOf6.onInputWheel != null)
482 {
483 componentOf6.onInputWheel(num);
484 num = (EInput.wheel = 0);
485 }
486 }
487 if (num != 0)
488 {
489 Layer layer = (EMono.ui.IsActive ? EMono.ui.GetTopLayer() : LayerAbility.Instance);
490 if (layer != null && layer.windows.Count > 0)
491 {
492 Window window = layer.windows[0];
493 if (InputModuleEX.IsPointerChildOf(window.rectTab) && !DropdownGrid.IsActive && window.NextTab(num))
494 {
495 num = (EInput.wheel = 0);
496 }
497 }
498 }
499 }
501 {
503 EInput.Consume();
504 }
505 switch (mode)
506 {
507 case Mode.Title:
509 {
510 timeRatio = 0f;
512 }
513 godray.SetActive(enable: false);
514 UpdateCursor();
515 EMono.ui.UpdateInput();
516 break;
517 case Mode.Zone:
518 {
520 {
521 break;
522 }
524 {
526 }
528 {
529 srTarget.enabled = true;
530 Vector3 position = EMono.player.target.pos.PositionCenter();
531 position.y += EMono.player.target.renderer.data.size.y;
532 position.z -= 10f;
533 srTarget.transform.parent.position = position;
534 }
535 else
536 {
537 srTarget.enabled = false;
538 }
539 EMono.player.pickupDelay -= Core.delta;
540 if (EMono.player.pickupDelay < 0f)
541 {
542 EMono.player.pickupDelay = 0f;
543 }
545 paused = EMono.ui.IsPauseGame || actionMode.ShouldPauseGame || Game.IsWaiting;
547 if (!EMono.pc.isDead)
548 {
549 if (AI_PlayMusic.keepPlaying && EInput.skipFrame <= 0 && Input.anyKeyDown && !Input.GetKey(KeyCode.Tab) && !Input.GetKey(KeyCode.LeftAlt))
550 {
552 }
554 }
555 else
556 {
557 EMono.ui.UpdateInput();
558 }
560 {
561 break;
562 }
564 {
566 if (!LayerDrama.IsActive())
567 {
569 }
570 }
572 {
573 EMono.player.deathDialog = true;
574 EMono.player.returnInfo = null;
575 EMono.player.ignoreFallOver = 1;
576 Msg.Say("diebye");
577 EMono.Sound.Play("dead_pc2");
578 EMono.Sound.Play("dead_pc");
579 string[] list = Lang.GetList("lastWords");
580 string lastWord = list.RandomItem();
582 {
584 }
585 EMono.ui.CloseLayers();
586 if ((bool)UIContextMenu.Current)
587 {
589 }
590 EInput.haltInput = false;
591 Dialog.InputName("dialogLastword", lastWord, delegate(bool cancel, string text)
592 {
593 if (!cancel)
594 {
595 lastWord = text;
596 }
597 Player obj = EMono.player;
598 obj.deathMsg = obj.deathMsg + Lang.space + lastWord.Bracket(1);
600 Debug.Log(lastWord);
602 Msg.Say(lastWord.Bracket(1));
603 List<string> list2 = new List<string>();
605 bool addTownRevive = lastTown != null && !EMono._zone.IsInstance;
607 {
608 if (addTownRevive)
609 {
610 list2.Add("pc_revive_town".lang(lastTown.Name));
611 }
612 list2.Add("pc_revive");
613 list2.Add("pc_gameover");
614 }
615 else
616 {
617 list2.Add("pc_gameover");
618 }
619 Debug.Log(list2.Count);
620 EMono.ui.AddLayer<LayerCover>().SetDuration(1f, delegate
621 {
622 EMono.ui.CloseLayers();
623 Dialog.List("pc_deathChoice".lang(), list2, (string j) => j, delegate(int c, string d)
624 {
625 EMono.player.deathDialog = false;
626 if (!EMono.game.principal.permadeath && (c == 0 || (addTownRevive && c == 1)))
627 {
628 EMono.pc.MakeGrave(lastWord);
629 EMono.pc.Revive();
630 EMono.pc.RecalculateFOV();
631 Zone zone = EMono.player.spawnZone ?? EMono.pc.homeZone;
632 if (addTownRevive && c == 0)
633 {
634 zone = lastTown;
635 }
636 if (EMono.game.activeZone == zone)
637 {
638 EMono.pc.Teleport(EMono._zone.GetSpawnPos(EMono.pc, ZoneTransition.EnterState.Return).GetNearestPoint() ?? EMono._map.GetCenterPos(), silent: true, force: true);
639 }
640 else
641 {
642 EMono.player.deathZoneMove = true;
643 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Return);
644 }
645 EMono.screen.FocusPC();
646 Msg.Say("crawlup");
647 if (EMono.player.stats.death == 0)
648 {
649 Tutorial.Reserve("death");
650 }
651 EMono.player.stats.death++;
652 if (EMono.player.stats.days <= 90)
653 {
654 EMono.player.stats.death2++;
655 }
656 }
657 else
658 {
659 EMono.game.GotoTitle(showDialog: false);
660 }
661 return true;
662 });
663 });
664 });
665 }
666 UpdateCursor();
668 EMono.Sound.UpdateBGM();
671 {
673 }
674 if (WidgetEquip.dirty)
675 {
677 }
679 {
680 foreach (Chara member in EMono.pc.party.members)
681 {
682 member.CalcBurden();
683 }
684 EMono.player.wasDirtyWeight = false;
685 }
686 if (!EMono.ui.IsActive)
687 {
689 }
690 else if (EMono.ui.mouseInfo.gameObject.activeSelf)
691 {
692 EMono.ui.mouseInfo.SetText();
693 }
694 EMono.screen.Draw();
698 {
699 break;
700 }
701 if (!EMono.ui.GetLayer<LayerDrama>())
702 {
704 {
705 case ZoneTransition.EnterState.Fall:
706 EMono.pc.PlaySound("fall");
707 EMono.pc.PlayAnime(AnimeID.FallSky);
708 EMono.pc.DamageHP((20 + EMono.rnd(30) + ((EMono.player.lastTransition.lastZone is Zone_Casino) ? 1000 : 0)) / ((!EMono.pc.IsLevitating) ? 1 : 10), AttackSource.Fall);
709 break;
710 case ZoneTransition.EnterState.Elevator:
711 EMono.pc.PlaySound("elevator");
712 break;
713 case ZoneTransition.EnterState.PortalReturn:
714 case ZoneTransition.EnterState.Return:
715 case ZoneTransition.EnterState.Teleport:
716 case ZoneTransition.EnterState.Moongate:
717 EMono.pc.PlayEffect("teleport");
718 EMono.pc.PlaySound("return");
719 break;
720 default:
721 SE.MoveZone();
722 break;
723 case ZoneTransition.EnterState.Encounter:
724 break;
725 }
726 }
727 bool flag = (EMono.rnd(5) == 0 && EMono.pc.burden.GetPhase() >= 3) || EMono.pc.burden.GetPhase() >= 4;
729 {
730 flag = false;
731 }
733 {
734 flag = flag;
736 }
737 if (flag)
738 {
739 EMono.pc.Stumble();
740 }
741 EMono.player.lastTransition = null;
742 break;
743 }
744 default:
745 UpdateCursor();
746 EMono.ui.UpdateInput();
747 break;
748 }
749 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
ChatCategory
Definition: ChatCategory.cs:2
static bool keepPlaying
Definition: AI_PlayMusic.cs:8
static void CancelKeepPlaying()
Definition: AI_PlayMusic.cs:40
virtual void OnBeforeUpdate()
Definition: ActionMode.cs:546
void UpdateInput()
Definition: ActionMode.cs:570
virtual void OnAfterUpdate()
Definition: ActionMode.cs:550
virtual float gameSpeed
Definition: ActionMode.cs:119
BaseTileSelector tileSelector
void UpdateShaders(float time=0f)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4276
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6664
CardRenderer renderer
Definition: Card.cs:64
Definition: Chara.cs:10
bool IsLevitating
Definition: Chara.cs:605
Party party
Definition: Chara.cs:45
override bool isSynced
Definition: Chara.cs:711
Zone currentZone
Definition: Chara.cs:261
void Stumble(int mtp=100)
Definition: Chara.cs:2054
string NameTitled
Definition: Chara.cs:524
Stats burden
Definition: Chara.cs:1205
GlobalData global
Definition: Chara.cs:78
bool isDead
Definition: Chara.cs:395
void CalcBurden()
Definition: Chara.cs:2039
InputSetting input
Definition: CoreConfig.cs:635
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:536
static bool IsActive
Definition: DropdownGrid.cs:8
static bool isCancel
Definition: EInput.cs:389
static int wheel
Definition: EInput.cs:300
static ButtonState middleMouse
Definition: EInput.cs:364
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static ButtonState mouse4
Definition: EInput.cs:368
static void UpdateOnlyAxis()
Definition: EInput.cs:475
static void Update()
Definition: EInput.cs:486
static bool isShiftDown
Definition: EInput.cs:272
static ButtonState rightMouse
Definition: EInput.cs:362
static ButtonState mouse3
Definition: EInput.cs:366
static int skipFrame
Definition: EInput.cs:298
static int rnd(int a)
Definition: EMono.cs:47
static SoundManager Sound
Definition: EMono.cs:39
bool IsActive
Definition: EloMapActor.cs:21
Definition: GameIO.cs:11
static void DeleteGame(string id, bool cloud, bool deleteBackup=true)
Definition: GameIO.cs:267
void Update()
Definition: GameUpdater.cs:465
Definition: Game.cs:9
static bool IsWaiting
Definition: Game.cs:262
GamePrincipal principal
Definition: Game.cs:225
static string id
Definition: Game.cs:148
SpatialManager spatials
Definition: Game.cs:153
bool isCloud
Definition: Game.cs:246
Zone activeZone
Definition: Game.cs:252
ZoneTransition transition
Definition: GlobalData.cs:6
static bool IsPointerChildOf(Component c)
Definition: Lang.cs:7
static string langCode
Definition: Lang.cs:29
static string[] GetList(string id)
Definition: Lang.cs:113
static LayerAbility Instance
Definition: LayerAbility.cs:21
void SetDuration(float duration, Action onKill)
Definition: LayerCover.cs:7
static bool IsActive()
Definition: LayerDrama.cs:34
Definition: Layer.cs:9
List< Window > windows
Definition: Layer.cs:116
bool isShowingLog
Definition: MsgBox.cs:55
Color Talk
Definition: MsgColors.cs:7
static MsgColors colors
Definition: Msg.cs:20
static void SetColor()
Definition: Msg.cs:22
Definition: Net.cs:12
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
Definition: Net.cs:335
List< Chara > members
Definition: Party.cs:19
void OnLeaveZone()
Definition: Player.cs:909
int uidLastTown
Definition: Player.cs:1005
ZoneTransition lastTransition
Definition: Player.cs:1216
float pickupDelay
Definition: Player.cs:1274
bool wasDirtyWeight
Definition: Player.cs:1236
int ignoreFallOver
Definition: Player.cs:1268
Chara target
Definition: Player.cs:1306
void MoveZone(Zone z)
Definition: Player.cs:2127
bool deathDialog
Definition: Player.cs:1238
string deathMsg
Definition: Player.cs:1258
ref Vector3 PositionCenter()
Definition: Point.cs:588
Vector2 size
Definition: RenderData.cs:31
RenderData data
Definition: RenderObject.cs:34
DamageTextRenderer damageTextRenderer
Definition: Scene.cs:109
float timeRatio
Definition: Scene.cs:130
ParticleSystem godray
Definition: Scene.cs:55
void UpdateCursor()
Definition: Scene.cs:757
bool paused
Definition: Scene.cs:140
Zone Find(string id)
override int GetPhase()
Definition: Stats.cs:117
Action< int > onInputWheel
Definition: UIButton.cs:148
static void UpdateButtons()
Definition: UIButton.cs:704
static UIContextMenu Current
void Next()
Definition: UIDropdown.cs:89
static UIDropdown activeInstance
Definition: UIDropdown.cs:12
void Prev()
Definition: UIDropdown.cs:97
static bool dirty
Definition: WidgetEquip.cs:13
static void Redraw()
Definition: WidgetEquip.cs:77
static bool dirtyCurrentItem
Definition: WidgetHotbar.cs:32
static WidgetMainText Instance
Definition: Window.cs:13
RectTransform rectTab
Definition: Window.cs:644
bool NextTab(int a)
Definition: Window.cs:1378
EnterState state
void RefreshElectricity()
Definition: Zone.cs:3192
bool IsInstance
Definition: Zone.cs:496
bool dirtyElectricity
Definition: Zone.cs:74

References WidgetMainText._ToggleLog(), EMono._zone, actionMode, UIDropdown.activeInstance, Game.activeZone, WidgetMainText.box, Chara.burden, Chara.CalcBurden(), AI_PlayMusic.CancelKeepPlaying(), Msg.colors, Core.config, EInput.Consume(), EMono.core, UIContextMenu.Current, Chara.currentZone, Card.DamageHP(), damageTextRenderer, RenderObject.data, Player.deathDialog, Player.deathMsg, Debug, GameIO.DeleteGame(), Core.delta, WidgetEquip.dirty, WidgetHotbar.dirtyCurrentItem, Zone.dirtyElectricity, ButtonState.down, BaseGameScreen.Draw(), elomapActor, SpatialManager.Find(), Player.flags, DamageTextRenderer.Flush(), EMono.game, ActionMode.gameSpeed, Lang.GetList(), Stats.GetPhase(), Chara.global, godray, UIContextMenu.Hide(), Game.id, if(), Player.ignoreFallOver, CoreConfig.input, Dialog.InputName(), LayerAbility.Instance, WidgetMainText.Instance, DropdownGrid.IsActive, EloMapActor.IsActive, LayerDrama.IsActive(), EInput.isCancel, Game.isCloud, Chara.isDead, Core.IsGameStarted, Zone.IsInstance, Chara.IsLevitating, InputModuleEX.IsPointerChildOf(), EInput.isShiftDown, MsgBox.isShowingLog, Chara.isSynced, Game.IsWaiting, AI_PlayMusic.keepPlaying, Lang.langCode, Player.lastTransition, ZoneTransition.lastZone, EInput.leftMouse, Party.members, CoreConfig.InputSetting.middleClick, EInput.middleMouse, CoreConfig.InputSetting.middlePressLong, mode, EInput.mouse3, CoreConfig.InputSetting.mouse3Click, CoreConfig.InputSetting.mouse3PressLong, EInput.mouse4, CoreConfig.InputSetting.mouse4Click, CoreConfig.InputSetting.mouse4PressLong, Player.MoveZone(), Chara.NameTitled, DropdownGrid.Next(), UIDropdown.Next(), Window.NextTab(), ActionMode.OnAfterUpdate(), ActionMode.OnBeforeUpdate(), UIButton.onInputWheel, Player.Flags.OnLeaveZone(), BaseTileSelector.OnUpdate(), Chara.party, paused, EMono.pc, GamePrincipal.permadeath, Player.pickupDelay, Card.PlayAnime(), Card.PlayEffect(), EMono.player, Card.PlaySound(), Card.pos, Point.PositionCenter(), ButtonState.pressing, DropdownGrid.Prev(), UIDropdown.Prev(), Game.principal, Window.rectTab, WidgetEquip.Redraw(), Player.RefreshCurrentHotItem(), Zone.RefreshElectricity(), Player.RefreshEmptyAlly(), Card.renderer, EInput.rightMouse, EMono.rnd(), Msg.Say(), EMono.scene, Core.screen, EMono.screen, Msg.SetColor(), LayerCover.SetDuration(), Player.simulatingZone, RenderData.size, EInput.skipFrame, EMono.Sound, Game.spatials, ZoneTransition.state, Chara.Stumble(), MsgColors.Talk, Player.target, BaseGameScreen.tileSelector, timeRatio, GlobalData.transition, EMono.ui, Player.uidLastTown, GameUpdater.Update(), EInput.Update(), UIButton.UpdateButtons(), UpdateCursor(), ActionMode.UpdateInput(), EInput.UpdateOnlyAxis(), Game.updater, BaseGameScreen.UpdateShaders(), UpdateTimeRatio(), Player.wasDirtyWeight, EInput.wheel, and Layer.windows.

Referenced by Core.Update().

◆ RebuildActorEx()

void Scene.RebuildActorEx ( )
inline

Definition at line 992 of file Scene.cs.

993 {
994 foreach (Thing thing in EMono._map.things)
995 {
996 if (!thing.trait.IDActorEx.IsEmpty())
997 {
998 AddActorEx(thing);
999 }
1000 }
1001 }
void AddActorEx(Card c, Action< ActorEx > onBeforeSetOwner=null)
Definition: Scene.cs:1021

References EMono._map, Trait.IDActorEx, Map.things, and Card.trait.

◆ RefreshActorEx()

void Scene.RefreshActorEx ( )
inline

Definition at line 1003 of file Scene.cs.

1004 {
1005 SoundManager.bgmDumpMod = 0f;
1006 foreach (ActorEx value in dictActorEx.Values)
1007 {
1008 value.Refresh();
1009 }
1010 }
void Refresh()
Definition: ActorEx.cs:98

References ActorEx.Refresh().

◆ RefreshBG()

void Scene.RefreshBG ( )
inline

Definition at line 803 of file Scene.cs.

804 {
807 {
808 bg = EMono.setting.render.bgs[MapBG.Snow];
809 }
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);
815 }
MapBG
Definition: MapBG.cs:2
RenderSetting render
Definition: GameSetting.cs:348
MapBG bg
Definition: MapConfig.cs:80
GameSetting.RenderSetting.MapBGSetting bg
Definition: Scene.cs:124
MeshRenderer skyPlane
Definition: Scene.cs:73
MeshRenderer skyBG
Definition: Scene.cs:71
virtual bool IsSnowZone
Definition: Spatial.cs:542

References EMono._map, EMono._zone, MapConfig.bg, GameSetting.RenderSetting.bgs, Map.config, Spatial.IsSnowZone, GameSetting.RenderSetting.MapBGSetting.mat, GameSetting.RenderSetting.MapBGSetting.plane, GameSetting.render, EMono.setting, and GameSetting.RenderSetting.MapBGSetting.skyBox.

Referenced by GameScreen.OnActivate(), and TraitMapBoard.TrySetAct().

◆ RefreshSync()

void Scene.RefreshSync ( )
inline

Definition at line 1089 of file Scene.cs.

1090 {
1091 for (int num = syncList.Count - 1; num >= 0; num--)
1092 {
1093 ISyncScreen syncScreen = syncList[num];
1094 if (syncScreen.Sync != syncFrame)
1095 {
1096 syncScreen.OnLeaveScreen();
1097 syncList.RemoveAt(num);
1098 }
1099 }
1100 syncFrame++;
1101 RenderObject.syncFrame = syncFrame;
1102 }
long syncFrame
Definition: Scene.cs:142

References ISyncScreen.OnLeaveScreen(), and ISyncScreen.Sync.

◆ RemoveActorEx()

void Scene.RemoveActorEx ( Card  c)
inline

Definition at line 1033 of file Scene.cs.

1034 {
1035 ActorEx actorEx = dictActorEx.TryGetValue(c);
1036 if (!(actorEx == null))
1037 {
1038 actorEx.Kill();
1039 dictActorEx.Remove(c);
1040 }
1041 }

References ActorEx.Kill().

Referenced by TraitJukeBox.OnToggle(), TraitRadio.OnUse(), and Zone.RemoveCard().

◆ ToggleBalloon()

void Scene.ToggleBalloon ( )
inline

Definition at line 973 of file Scene.cs.

974 {
976 EMono.ui.ShowBalloon(!hideBalloon);
977 SE.ClickGeneral();
979 }
bool hideBalloon
Definition: Scene.cs:147

References WidgetSystemIndicator.Refresh(), and EMono.ui.

Referenced by HotItemToggle.OnClick().

◆ ToggleBirdView()

void Scene.ToggleBirdView ( bool  sound = true)
inline

Definition at line 960 of file Scene.cs.

961 {
962 SE.ClickGeneral();
964 {
966 }
967 else
968 {
970 }
971 }
static AM_Bird Bird
Definition: ActionMode.cs:31

References actionMode, ActionMode.Activate(), ActionMode.Bird, ActionMode.Deactivate(), and EMono.scene.

Referenced by HotItemContext.Show().

◆ ToggleFreePos()

void Scene.ToggleFreePos ( )
inline

Definition at line 910 of file Scene.cs.

911 {
913 {
914 SE.Beep();
915 return;
916 }
917 EMono.game.config.freePos = !EMono.game.config.freePos;
918 OnToggle();
919 }
bool freePos
Definition: Game.cs:31
Config config
Definition: Game.cs:219
void OnToggle()
Definition: Scene.cs:880

References Core.config, Game.config, EMono.core, CoreConfig.GameConfig.freePos, Game.Config.freePos, CoreConfig.game, and EMono.game.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleHighlightArea()

void Scene.ToggleHighlightArea ( )
inline

Definition at line 954 of file Scene.cs.

955 {
956 EMono.game.config.highlightArea = !EMono.game.config.highlightArea;
957 OnToggle();
958 }
bool highlightArea
Definition: Game.cs:40

References Game.config, EMono.game, and Game.Config.highlightArea.

◆ ToggleLight()

void Scene.ToggleLight ( )
inline

Definition at line 893 of file Scene.cs.

894 {
895 EMono.game.config.buildLight = !EMono.game.config.buildLight;
896 OnToggle();
897 }
bool buildLight
Definition: Game.cs:37

References Game.Config.buildLight, Game.config, and EMono.game.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleMuteBGM()

void Scene.ToggleMuteBGM ( )
inline

Definition at line 981 of file Scene.cs.

982 {
984 SE.ClickGeneral();
986 if (!EMono.Sound.muteBGM)
987 {
989 }
990 }
SoundSetting sound
Definition: CoreConfig.cs:623
void ApplyVolume()
Definition: CoreConfig.cs:1029

References CoreConfig.ApplyVolume(), Core.config, EMono.core, WidgetSystemIndicator.Refresh(), CoreConfig.sound, EMono.Sound, and CoreConfig.SoundSetting.volumeBGM.

Referenced by HotItemToggle.OnClick(), and ActionMode.UpdateInput().

◆ ToggleRoof()

void Scene.ToggleRoof ( )
inline

Definition at line 927 of file Scene.cs.

928 {
929 EMono.game.config.noRoof = !EMono.game.config.noRoof;
930 OnToggle();
931 }
bool noRoof
Definition: Game.cs:28

References Game.config, EMono.game, and Game.Config.noRoof.

Referenced by HotItemToggle.OnClick(), and AM_ViewMap.OnUpdateInput().

◆ ToggleShowRoof()

void Scene.ToggleShowRoof ( )
inline

Definition at line 887 of file Scene.cs.

888 {
889 EMono.game.config.showRoof = !EMono.game.config.showRoof;
890 OnToggle();
891 }
bool showRoof
Definition: Game.cs:13

References Game.config, EMono.game, and Game.Config.showRoof.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleShowWall()

void Scene.ToggleShowWall ( )
inline

Definition at line 921 of file Scene.cs.

922 {
923 EMono.game.config.showWall = !EMono.game.config.showWall;
924 OnToggle();
925 }
bool showWall
Definition: Game.cs:16

References Game.config, EMono.game, and Game.Config.showWall.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleSlope()

void Scene.ToggleSlope ( )
inline

Definition at line 933 of file Scene.cs.

934 {
935 EMono.game.config.slope = !EMono.game.config.slope;
936 OnToggle();
937 skipAnime = true;
938 }
bool slope
Definition: Game.cs:25

References Game.config, EMono.game, and Game.Config.slope.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleSnapFreePos()

void Scene.ToggleSnapFreePos ( )
inline

Definition at line 899 of file Scene.cs.

900 {
902 {
903 SE.Beep();
904 return;
905 }
906 EMono.game.config.snapFreePos = !EMono.game.config.snapFreePos;
907 OnToggle();
908 }
bool snapFreePos
Definition: Game.cs:34

References Core.config, Game.config, EMono.core, CoreConfig.GameConfig.freePos, CoreConfig.game, EMono.game, and Game.Config.snapFreePos.

Referenced by ActionMode.DoFunc(), and HotItemToggle.OnClick().

◆ ToggleTilt()

void Scene.ToggleTilt ( )
inline

Definition at line 940 of file Scene.cs.

941 {
942 if (EMono._zone.IsRegion)
943 {
944 EMono.game.config.tiltRegion = !EMono.game.config.tiltRegion;
945 }
946 else
947 {
948 EMono.game.config.tilt = !EMono.game.config.tilt;
949 }
951 OnToggle();
952 }
bool tilt
Definition: Game.cs:19
bool tiltRegion
Definition: Game.cs:22

References EMono._zone, Game.config, EMono.game, Spatial.IsRegion, BaseGameScreen.RefreshTilt(), EMono.screen, Game.Config.tilt, and Game.Config.tiltRegion.

◆ TryWarnLinuxMod()

void Scene.TryWarnLinuxMod ( )
inline

Definition at line 167 of file Scene.cs.

168 {
170 {
171 Dialog.TryWarn("warn_linuxMod", delegate
172 {
173 Application.OpenURL(Lang.isJP ? "https://ylvania.org/elin_dev.html" : "https://ylvania.org/elin_dev_e.html");
174 }, yes: false);
175 }
176 }
bool ignoreLinuxModWarning
Definition: CoreConfig.cs:617
static void TryWarn(string lang, Action action, bool yes=true, string text=null)
Definition: Dialog.cs:298
static bool isJP
Definition: Lang.cs:39

References Core.config, EMono.core, CoreConfig.ignoreLinuxModWarning, Lang.isJP, and Dialog.TryWarn().

Referenced by MiniGame.Activate().

◆ TryWarnMacScreen()

void Scene.TryWarnMacScreen ( )
inline

Definition at line 156 of file Scene.cs.

157 {
158 if (!EMono.core.config.ignoreParallelsWarning && SystemInfo.graphicsDeviceName.Contains("Parallels Display"))
159 {
160 Dialog.TryWarn("warn_parallels", delegate
161 {
162 Application.OpenURL(Lang.isJP ? "https://ylvania.org/elin_dev.html" : "https://ylvania.org/elin_dev_e.html");
163 }, yes: false);
164 }
165 }
bool ignoreParallelsWarning
Definition: CoreConfig.cs:615

References Core.config, EMono.core, CoreConfig.ignoreParallelsWarning, Lang.isJP, and Dialog.TryWarn().

Referenced by Init().

◆ UpdateCursor()

void Scene.UpdateCursor ( )
inline

Definition at line 757 of file Scene.cs.

758 {
759 CursorSystem.position = EInput.mposWorld;
760 CursorSystem.position.z = -100f;
762 {
763 CursorSystem.posOrigin = EMono.screen.position.SetZ(-100f);
765 }
766 else
767 {
769 }
770 }
virtual void OnUpdateCursor()
Definition: ActionMode.cs:554
static void SetCursor(CursorInfo info=null, int _priority=0)
static Vector3 mposWorld
Definition: EInput.cs:350

References EMono.core, Core.IsGameStarted, EInput.mposWorld, ActionMode.OnUpdateCursor(), BaseGameScreen.position, EMono.screen, and CursorSystem.SetCursor().

Referenced by ActionMode.Activate(), and OnUpdate().

◆ UpdateTimeRatio()

void Scene.UpdateTimeRatio ( )
inline

Definition at line 772 of file Scene.cs.

773 {
774 float num = ((EMono._map.config.hour != -1) ? ((float)EMono._map.config.hour) : ((float)EMono.world.date.hour + (float)EMono.world.date.min / 60f));
775 if (num > 12f)
776 {
777 num = 24f - num;
778 }
779 timeRatio = Mathf.Clamp(num * 100f / 24f * 0.01f + EMono.setting.dayRatioMod, 0f, 1f);
780 }
int min
Definition: Date.cs:86
float dayRatioMod
Definition: GameSetting.cs:368
int hour
Definition: MapConfig.cs:98
GameDate date
Definition: World.cs:6

References EMono._map, Map.config, World.date, GameSetting.dayRatioMod, MapConfig.hour, Date.min, EMono.setting, and EMono.world.

Referenced by Init(), and OnUpdate().

Member Data Documentation

◆ actionMode

◆ audioListener

AudioListener Scene.audioListener

Definition at line 35 of file Scene.cs.

◆ bg

Definition at line 124 of file Scene.cs.

Referenced by BaseTileMap.Draw().

◆ blizzards

ParticleSystem [] Scene.blizzards

Definition at line 67 of file Scene.cs.

Referenced by BaseGameScreen.RefreshWeather(), and GameScreenElona.RefreshWeather().

◆ blossom

ParticleSystem Scene.blossom

Definition at line 59 of file Scene.cs.

Referenced by BaseGameScreen.RefreshWeather(), and GameScreenElona.RefreshWeather().

◆ blossoms

ParticleSystem [] Scene.blossoms

◆ bubble

ParticleSystem Scene.bubble

Definition at line 63 of file Scene.cs.

Referenced by Init().

◆ cam

◆ camSupport

◆ camTreasure

Camera Scene.camTreasure

Definition at line 39 of file Scene.cs.

Referenced by LayerTreasureMap.SetMap().

◆ ClickPoint

Point Scene.ClickPoint = new Point()
static

Definition at line 23 of file Scene.cs.

Referenced by AM_Sim._OnUpdateInput().

◆ damageTextRenderer

DamageTextRenderer Scene.damageTextRenderer = new DamageTextRenderer()

Definition at line 109 of file Scene.cs.

Referenced by Card.DamageHP(), and OnUpdate().

◆ dictActorEx

Dictionary<Card, ActorEx> Scene.dictActorEx = new Dictionary<Card, ActorEx>()

Definition at line 144 of file Scene.cs.

◆ elomapActor

◆ ether

ParticleSystem Scene.ether

◆ etherBlossom

ParticleSystem Scene.etherBlossom

Definition at line 61 of file Scene.cs.

Referenced by Init().

◆ filterRain

Definition at line 77 of file Scene.cs.

◆ firefly

VFX Scene.firefly

Definition at line 43 of file Scene.cs.

Referenced by BaseGameScreen.Activate(), and BaseGameScreen.RefreshSky().

◆ fireflyNight

VFX Scene.fireflyNight

Definition at line 45 of file Scene.cs.

Referenced by BaseGameScreen.Activate(), and BaseGameScreen.RefreshSky().

◆ flock

◆ godray

ParticleSystem Scene.godray

◆ godrayDust

ParticleSystem Scene.godrayDust

Definition at line 57 of file Scene.cs.

Referenced by BaseGameScreen.RefreshWeather(), and GameScreenElona.RefreshWeather().

◆ hideBalloon

bool Scene.hideBalloon

Definition at line 147 of file Scene.cs.

Referenced by ActionMode.Activate(), and HotItemToggle.ShouldHighlight().

◆ HitPoint

◆ isAnnounced

bool Scene.isAnnounced
static

Definition at line 19 of file Scene.cs.

Referenced by Init().

◆ loadedPrefabs

List<GameObject> Scene.loadedPrefabs = new List<GameObject>()

Definition at line 133 of file Scene.cs.

◆ matFloorEx

Material Scene.matFloorEx

Definition at line 107 of file Scene.cs.

Referenced by BaseGameScreen.RefreshAll().

◆ mode

Mode Scene.mode

Definition at line 127 of file Scene.cs.

Referenced by Init(), and OnUpdate().

◆ mouseTarget

◆ passes

MeshPass [] Scene.passes

Definition at line 121 of file Scene.cs.

Referenced by MeshPass.Refresh(), and CoreDebug.Test_Filter().

◆ paused

bool Scene.paused

◆ popper

PopperManager Scene.popper

Definition at line 99 of file Scene.cs.

Referenced by DamageTextRenderer.Flush(), and BaseStats.PopText().

◆ posAudioListener

Vector3 Scene.posAudioListener

Definition at line 33 of file Scene.cs.

Referenced by BaseGameScreen.RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ profile

◆ psFey

ParticleSystem Scene.psFey

Definition at line 119 of file Scene.cs.

Referenced by GrowSystem.OnRenderTileMap().

◆ psFoot

ParticleSystem Scene.psFoot

Definition at line 111 of file Scene.cs.

Referenced by Chara._Move().

◆ psRainSplash

ParticleSystem Scene.psRainSplash

Definition at line 115 of file Scene.cs.

Referenced by GameUpdater.Update100ms().

◆ psRainSplashWater

ParticleSystem Scene.psRainSplashWater

Definition at line 117 of file Scene.cs.

Referenced by GameUpdater.Update100ms().

◆ psSmoke

ParticleSystem Scene.psSmoke

Definition at line 113 of file Scene.cs.

Referenced by Chara._Move().

◆ rain

ParticleSystem Scene.rain

◆ screenElin

◆ screenElona

GameScreenElona Scene.screenElona

◆ screenNoMap

GameScreenNoMap Scene.screenNoMap

Definition at line 97 of file Scene.cs.

Referenced by Core.Awake(), and Init().

◆ sfxEther

SoundSource Scene.sfxEther

Definition at line 91 of file Scene.cs.

◆ sfxFire

SoundSource Scene.sfxFire

Definition at line 89 of file Scene.cs.

Referenced by BaseGameScreen.Activate(), BaseTileMap.Draw(), and TileMapElona.Draw().

◆ sfxRain

SoundSource Scene.sfxRain

◆ sfxSea

SoundSource Scene.sfxSea

◆ sfxUnderwater

SoundSource Scene.sfxUnderwater

Definition at line 85 of file Scene.cs.

Referenced by BaseGameScreen.Activate().

◆ sfxWind

SoundSource Scene.sfxWind

◆ skipAnime

bool Scene.skipAnime
static

Definition at line 25 of file Scene.cs.

Referenced by BaseGameScreen.Draw(), Init(), and CharaRenderer.UpdatePosition().

◆ skyBG

MeshRenderer Scene.skyBG

Definition at line 71 of file Scene.cs.

Referenced by GameScreenElona.OnActivate().

◆ skyPlane

MeshRenderer Scene.skyPlane

Definition at line 73 of file Scene.cs.

Referenced by GameScreenElona.OnActivate().

◆ snow

ParticleSystem Scene.snow

◆ srTarget

SpriteRenderer Scene.srTarget

Definition at line 103 of file Scene.cs.

◆ star

VFX Scene.star

Definition at line 47 of file Scene.cs.

Referenced by BaseGameScreen.Activate(), and BaseGameScreen.RefreshSky().

◆ syncFrame

long Scene.syncFrame

Definition at line 142 of file Scene.cs.

Referenced by TaskDesignation.Draw().

◆ syncList

◆ test

Vector2 [] Scene.test

Definition at line 17 of file Scene.cs.

◆ tileset

Tileset Scene.tileset

Definition at line 105 of file Scene.cs.

Referenced by TextureData.IsValid().

◆ timeRatio

◆ transAudio

Transform Scene.transAudio

Definition at line 31 of file Scene.cs.

Referenced by Point.PlaySound(), and ESoundSource.Refresh().

◆ transBlizzard

Transform Scene.transBlizzard

Definition at line 29 of file Scene.cs.

◆ transFocus

Transform Scene.transFocus

Definition at line 27 of file Scene.cs.

Referenced by AM_Bird.OnUpdateInput().

Property Documentation

◆ elomap


The documentation for this class was generated from the following file: