Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerSleep Class Reference
Inheritance diagram for LayerSleep:
ELayer Layer IUISkin

Public Member Functions

override void OnAfterInit ()
 
void Wait (float duration=5f)
 
void Sleep (int _hours, Thing _bed, Thing _pillow=null)
 
void Advance ()
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Public Attributes

float repeatRate
 
float coverAlpha
 
float coverShow
 
float coverHide
 
float hideDelay
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Private Attributes

int hours
 
int min
 
int maxMin
 
Thing bed
 
Thing pillow
 

Additional Inherited Members

- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 
- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Detailed Description

Definition at line 1 of file LayerSleep.cs.

Member Function Documentation

◆ Advance()

void LayerSleep.Advance ( )
inline

Definition at line 52 of file LayerSleep.cs.

53 {
54 if (min > maxMin)
55 {
56 CancelInvoke();
58 {
60 }
61 foreach (Chara member in ELayer.pc.party.members)
62 {
63 member.OnSleep(bed);
64 }
65 Msg.Say("slept", hours.ToString() ?? "");
66 if (pillow != null && pillow.trait is TraitPillowOpatos)
67 {
69 }
71 {
73 }
75 {
77 }
79 TweenUtil.Delay(hideDelay, delegate
80 {
82 {
83 Close();
84 });
85 });
86 }
87 else
88 {
89 min += 10;
91 }
92 }
Trait trait
Definition: Card.cs:49
Definition: Chara.cs:10
Party party
Definition: Chara.cs:43
void OnSleep(Thing bed=null, int days=1)
Definition: Chara.cs:8825
bool ignoreAutoSave
Definition: CoreDebug.cs:125
Definition: ELayer.cs:4
static World world
Definition: ELayer.cs:39
static Chara pc
Definition: ELayer.cs:15
static Player player
Definition: ELayer.cs:13
static Game game
Definition: ELayer.cs:9
static CoreDebug debug
Definition: ELayer.cs:43
static UI ui
Definition: ELayer.cs:21
static Zone _zone
Definition: ELayer.cs:25
void AdvanceMin(int a)
Definition: GameDate.cs:22
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:960
Thing bed
Definition: LayerSleep.cs:19
Thing pillow
Definition: LayerSleep.cs:21
float coverHide
Definition: LayerSleep.cs:9
float hideDelay
Definition: LayerSleep.cs:11
int maxMin
Definition: LayerSleep.cs:17
virtual void Close()
Definition: Layer.cs:463
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< Chara > members
Definition: Party.cs:18
void SimulateFaction()
Definition: Player.cs:1612
void RenewRandomSites()
Definition: Region.cs:75
void UpdateRandomSites()
Definition: Region.cs:86
virtual bool IsRegion
Definition: Spatial.cs:501
void HideCover(float duration=0f, Action onComplete=null)
Definition: UI.cs:283
void ShowCover(float duration=0f, float dest=1f, Action onComplete=null, Color color=default(Color))
Definition: UI.cs:270
Region region
Definition: World.cs:23
GameDate date
Definition: World.cs:6
bool IsInstance
Definition: Zone.cs:480
bool IsPCFaction
Definition: Zone.cs:464
Region Region
Definition: Zone.cs:160

References ELayer._zone, GameDate.AdvanceMin(), bed, Layer.Close(), coverHide, World.date, ELayer.debug, ELayer.game, UI.HideCover(), hideDelay, hours, CoreDebug.ignoreAutoSave, Zone.IsInstance, Zone.IsPCFaction, Spatial.IsRegion, maxMin, Party.members, min, Chara.OnSleep(), Chara.party, ELayer.pc, pillow, ELayer.player, World.region, Zone.Region, Region.RenewRandomSites(), Game.Save(), Msg.Say(), UI.ShowCover(), Player.SimulateFaction(), Card.trait, ELayer.ui, Region.UpdateRandomSites(), and ELayer.world.

◆ OnAfterInit()

override void LayerSleep.OnAfterInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 23 of file LayerSleep.cs.

24 {
26 }
float coverShow
Definition: LayerSleep.cs:7
float coverAlpha
Definition: LayerSleep.cs:5

References coverAlpha, coverShow, UI.ShowCover(), and ELayer.ui.

◆ Sleep()

void LayerSleep.Sleep ( int  _hours,
Thing  _bed,
Thing  _pillow = null 
)
inline

Definition at line 40 of file LayerSleep.cs.

41 {
42 ELayer.Sound.Play("jingle_sleep");
43 hours = _hours;
44 bed = _bed;
45 pillow = _pillow;
46 maxMin = hours * 60;
47 InvokeRepeating("Advance", repeatRate, repeatRate);
48 ELayer.pc.faith.Revelation("sleep");
50 }
Religion faith
Definition: Chara.cs:424
static SoundManager Sound
Definition: ELayer.cs:41
float repeatRate
Definition: LayerSleep.cs:3
int slept
Definition: Player.cs:86
Stats stats
Definition: Player.cs:817
void Revelation(string idTalk, int chance=100)
Definition: Religion.cs:145

References bed, Chara.faith, hours, maxMin, ELayer.pc, pillow, ELayer.player, repeatRate, Religion.Revelation(), Player.Stats.slept, ELayer.Sound, and Player.stats.

◆ Wait()

void LayerSleep.Wait ( float  duration = 5f)
inline

Definition at line 28 of file LayerSleep.cs.

29 {
30 ELayer.Sound.Play("jingle_sleep");
31 TweenUtil.Tween(duration, null, delegate
32 {
34 {
35 Close();
36 });
37 });
38 }

References Layer.Close(), coverHide, UI.HideCover(), ELayer.Sound, and ELayer.ui.

Member Data Documentation

◆ bed

Thing LayerSleep.bed
private

Definition at line 19 of file LayerSleep.cs.

Referenced by Advance(), and Sleep().

◆ coverAlpha

float LayerSleep.coverAlpha

Definition at line 5 of file LayerSleep.cs.

Referenced by OnAfterInit().

◆ coverHide

float LayerSleep.coverHide

Definition at line 9 of file LayerSleep.cs.

Referenced by Advance(), and Wait().

◆ coverShow

float LayerSleep.coverShow

Definition at line 7 of file LayerSleep.cs.

Referenced by OnAfterInit().

◆ hideDelay

float LayerSleep.hideDelay

Definition at line 11 of file LayerSleep.cs.

Referenced by Advance().

◆ hours

int LayerSleep.hours
private

Definition at line 13 of file LayerSleep.cs.

Referenced by Advance(), and Sleep().

◆ maxMin

int LayerSleep.maxMin
private

Definition at line 17 of file LayerSleep.cs.

Referenced by Advance(), and Sleep().

◆ min

int LayerSleep.min
private

Definition at line 15 of file LayerSleep.cs.

Referenced by Advance().

◆ pillow

Thing LayerSleep.pillow
private

Definition at line 21 of file LayerSleep.cs.

Referenced by Advance(), and Sleep().

◆ repeatRate

float LayerSleep.repeatRate

Definition at line 3 of file LayerSleep.cs.

Referenced by Sleep().


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