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

Public Member Functions

override void OnAfterInit ()
 
void Reset ()
 
override void OnKill ()
 
void AddRandom ()
 
void Generate ()
 
void OnClickClear ()
 
void OnClickNextMode ()
 
void OnClickConfig ()
 
- 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

HoardActor actor
 
bool autoList
 
int autoNum
 
float idleTimer
 
float fadeSpeed
 
CanvasGroup cg
 
UIText textMode
 
UIText textScore
 
UIText textTime
 
UIButton[] debugButtons
 
LayoutGroup layoutMenu
 
int v
 
- 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
 

Properties

Hoard hoard [get]
 
- 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]
 

Private Member Functions

void Update ()
 
void UpdateMousePos ()
 

Private Attributes

int lastScore
 
Vector3 lastMousePos
 
bool hasMouseMoved
 

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
 

Detailed Description

Definition at line 5 of file LayerHoard.cs.

Member Function Documentation

◆ AddRandom()

void LayerHoard.AddRandom ( )
inline

Definition at line 157 of file LayerHoard.cs.

158 {
159 foreach (SourceCollectible.Row row in ELayer.sources.collectibles.rows)
160 {
161 if (!row.tag.Contains("noSpawn"))
162 {
163 int num = ((row.num == 0) ? 10 : row.num);
164 hoard.Add(row.id, ELayer.rnd(ELayer.rnd(ELayer.rnd(ELayer.rnd(num + 1) + 1) + 1) + 1));
165 }
166 }
167 Reset();
168 }
Definition: ELayer.cs:4
static SourceManager sources
Definition: ELayer.cs:37
static int rnd(int a)
Definition: ELayer.cs:49
Item Add(string id)
Definition: Hoard.cs:161
void Reset()
Definition: LayerHoard.cs:68
Hoard hoard
Definition: LayerHoard.cs:37
SourceCollectible collectibles

References Hoard.Add(), SourceManager.collectibles, hoard, Reset(), ELayer.rnd(), and ELayer.sources.

◆ Generate()

void LayerHoard.Generate ( )
inline

Definition at line 170 of file LayerHoard.cs.

171 {
172 hoard.Clear();
173 foreach (SourceCollectible.Row row in ELayer.sources.collectibles.rows)
174 {
175 if (!row.tag.Contains("noSpawn"))
176 {
177 hoard.Add(row.id);
178 }
179 }
180 hoard.mode = Hoard.Mode.lux;
181 Reset();
182 }
Definition: Hoard.cs:8
void Clear()
Definition: Hoard.cs:226
Mode
Definition: Hoard.cs:10

References Hoard.Add(), Hoard.Clear(), SourceManager.collectibles, hoard, Reset(), and ELayer.sources.

◆ OnAfterInit()

override void LayerHoard.OnAfterInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 39 of file LayerHoard.cs.

40 {
42 Msg.TalkHomeMemeber("layerHoard");
45 if (hoard.items.Count == 0)
46 {
48 }
49 else
50 {
51 Reset();
52 }
53 InvokeRepeating("UpdateMousePos", 0f, 0.1f);
55 {
56 UIButton[] array = debugButtons;
57 for (int i = 0; i < array.Length; i++)
58 {
59 array[i].SetActive(enable: false);
60 }
61 }
62 layoutMenu.RebuildLayout(recursive: true);
63 SoundManager.disableSpread = true;
64 ELayer.Sound.zone.enabled = false;
65 ELayer.scene.cam.enabled = false;
66 }
void Activate(bool toggle=true, bool forceActivate=false)
Definition: ActionMode.cs:339
static AM_NoMap NoMap
Definition: ActionMode.cs:25
bool debugHoard
Definition: CoreDebug.cs:155
static CoreDebug debug
Definition: ELayer.cs:43
Dictionary< string, Item > items
Definition: Hoard.cs:106
UIButton[] debugButtons
Definition: LayerHoard.cs:25
void OnClickClear()
Definition: LayerHoard.cs:184
LayoutGroup layoutMenu
Definition: LayerHoard.cs:27
HoardActor actor
Definition: LayerHoard.cs:7
Definition: Msg.cs:5
static PopItem TalkHomeMemeber(string id)
Definition: Msg.cs:219
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References ActionMode.Activate(), actor, SourceManager.collectibles, ELayer.debug, debugButtons, CoreDebug.debugHoard, hoard, Hoard.items, layoutMenu, ActionMode.NoMap, OnClickClear(), Reset(), ELayer.sources, Msg.TalkHomeMemeber(), and Util.

◆ OnClickClear()

void LayerHoard.OnClickClear ( )
inline

Definition at line 184 of file LayerHoard.cs.

185 {
186 hoard.Clear();
187 hoard.Add("gold", 1);
188 Reset();
189 }

References Hoard.Add(), Hoard.Clear(), hoard, and Reset().

Referenced by OnAfterInit().

◆ OnClickConfig()

void LayerHoard.OnClickConfig ( )
inline

Definition at line 198 of file LayerHoard.cs.

199 {
200 UIContextMenu uIContextMenu = ELayer.ui.contextMenu.Create("ContextHoard");
201 int max = actor.bgs.Length - 1;
202 uIContextMenu.AddSlider("room", (float n) => n + " / " + max, hoard.bg, delegate(float v)
203 {
204 hoard.bg = (int)v;
206 }, 0f, max, isInt: true, hideOther: false);
207 uIContextMenu.AddSlider("reflection", (float n) => n + " %", hoard.reflection, delegate(float v)
208 {
209 hoard.reflection = (int)v;
211 }, 0f, 300f, isInt: true, hideOther: false);
212 uIContextMenu.AddSlider("maxSounds", (float n) => n.ToString() ?? "", hoard.maxSounds, delegate(float v)
213 {
214 hoard.maxSounds = (int)v;
215 }, 0f, 64f, isInt: true, hideOther: false);
216 uIContextMenu.AddSlider("volume", (float n) => n.ToString() ?? "", hoard.volume, delegate(float v)
217 {
218 hoard.volume = (int)v;
219 }, 0f, 200f, isInt: true, hideOther: false);
220 uIContextMenu.AddToggle("voice", hoard.voice, delegate(bool on)
221 {
222 hoard.voice = on;
223 });
224 uIContextMenu.AddToggle("shadow", hoard.shadow, delegate(bool on)
225 {
226 hoard.shadow = on;
227 });
228 uIContextMenu.AddToggle("pixelPerfect", hoard.pixelPerfect, delegate(bool on)
229 {
230 hoard.pixelPerfect = on;
232 });
233 uIContextMenu.Show();
234 }
static UI ui
Definition: ELayer.cs:21
void RefreshBG()
Definition: HoardActor.cs:442
void RefreshZoom()
Definition: HoardActor.cs:405
int reflection
Definition: Hoard.cs:118
bool shadow
Definition: Hoard.cs:132
bool voice
Definition: Hoard.cs:134
int maxSounds
Definition: Hoard.cs:121
int bg
Definition: Hoard.cs:115
bool pixelPerfect
Definition: Hoard.cs:136
int volume
Definition: Hoard.cs:124
UIContextMenuItem AddToggle(string idLang="", bool isOn=false, UnityAction< bool > action=null)
void Show(UIItem i)
UIContextMenuItem AddSlider(string text, Func< float, string > textFunc, float value, Action< float > action, float min=0f, float max=1f, bool isInt=false, bool hideOther=true, bool useInput=false)

References actor, UIContextMenu.AddSlider(), UIContextMenu.AddToggle(), Hoard.bg, hoard, Hoard.maxSounds, Hoard.pixelPerfect, Hoard.reflection, HoardActor.RefreshBG(), HoardActor.RefreshZoom(), Hoard.shadow, UIContextMenu.Show(), ELayer.ui, v, Hoard.voice, and Hoard.volume.

◆ OnClickNextMode()

void LayerHoard.OnClickNextMode ( )
inline

Definition at line 191 of file LayerHoard.cs.

192 {
193 hoard.mode = hoard.mode.NextEnum();
194 Msg.Nerun("h_filter".lang(("h_" + hoard.mode).lang()));
195 Reset();
196 }
Mode mode
Definition: Hoard.cs:112
static void Nerun(string lang, string idPortrait="UN_nerun")
Definition: Msg.cs:145

References hoard, Hoard.mode, Msg.Nerun(), and Reset().

◆ OnKill()

override void LayerHoard.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 74 of file LayerHoard.cs.

75 {
76 actor.Clear();
77 Object.DestroyImmediate(actor.gameObject);
79 ELayer.ui.cg.alpha = 1f;
80 ELayer.Sound.maxSounds = ELayer.Sound._maxSounds;
81 SoundManager.disableSpread = false;
82 ELayer.Sound.zone.enabled = true;
83 ELayer.scene.cam.enabled = true;
84 }
static ActionMode DefaultMode
Definition: ActionMode.cs:7
static SoundManager Sound
Definition: ELayer.cs:41
void Clear()
Definition: HoardActor.cs:451

References ActionMode.Activate(), actor, HoardActor.Clear(), ActionMode.DefaultMode, and ELayer.Sound.

◆ Reset()

void LayerHoard.Reset ( )
inline

Definition at line 68 of file LayerHoard.cs.

69 {
71 textMode.text = "[" + ("h_" + hoard.mode).lang() + "]";
72 }
void Activate()
Definition: HoardActor.cs:82

References HoardActor.Activate(), actor, hoard, and Hoard.mode.

Referenced by AddRandom(), Generate(), OnAfterInit(), OnClickClear(), OnClickNextMode(), and Update().

◆ Update()

void LayerHoard.Update ( )
inlineprivate

Definition at line 86 of file LayerHoard.cs.

87 {
88 if (textScore.gameObject.activeSelf && hoard.score != lastScore)
89 {
90 textScore.text = hoard.score + " / " + hoard.hiScore;
92 }
93 if (Input.GetMouseButtonDown(2))
94 {
95 Reset();
96 }
98 {
99 if (Input.GetKeyDown(KeyCode.H))
100 {
101 hoard.hentai = true;
102 hoard.Add("lulu", 2);
103 hoard.Add("tentacle", 1);
104 hoard.Add("tentacle2", 1);
105 hoard.Add("tentacle3", 1);
106 hoard.Add("tentacle4", 2);
107 Msg.SayPic("UN_farris", "変態だー!");
108 Reset();
109 }
110 if (Input.GetKeyDown(KeyCode.M))
111 {
112 try
113 {
114 CollectibleActor collectibleActor = actor.actors.FirstOrDefault((CollectibleActor a) => a.item.id == "mani");
115 if ((bool)collectibleActor && collectibleActor.gameObject.activeInHierarchy)
116 {
117 Msg.Nerun("あ・・・");
118 RigidExplode rigidExplode = collectibleActor.gameObject.AddComponent<RigidExplode>();
119 rigidExplode.particle = actor.psExplode;
120 rigidExplode.radius *= 10f;
121 rigidExplode.force *= 10f;
122 rigidExplode.chance = 1f;
123 rigidExplode.intervalMin = (rigidExplode.intervalMax = 2f);
124 rigidExplode.rb = collectibleActor.GetComponent<Rigidbody2D>();
125 actor.updates.Add(rigidExplode);
126 }
127 }
128 catch
129 {
130 }
131 }
132 }
133 UIButton componentOf = InputModuleEX.GetComponentOf<UIButton>();
134 if (ELayer.ui.GetTopLayer() != this || ((bool)componentOf && componentOf.transform.IsChildOf(base.transform)) || hasMouseMoved)
135 {
136 idleTimer = 0f;
137 v = 1;
138 }
139 else
140 {
141 idleTimer += Time.deltaTime;
142 if (idleTimer > 1f)
143 {
144 v = -1;
145 }
146 }
147 (cg ?? ELayer.ui.cg).alpha += (float)v * Time.deltaTime * fadeSpeed;
148 ELayer.Sound.maxSounds = hoard.maxSounds;
149 }
bool enable
Definition: CoreDebug.cs:285
List< CollectibleActor > actors
Definition: HoardActor.cs:34
List< RigidUpdate > updates
Definition: HoardActor.cs:36
ParticleSystem psExplode
Definition: HoardActor.cs:50
int score
Definition: Hoard.cs:130
int hiScore
Definition: Hoard.cs:127
float fadeSpeed
Definition: LayerHoard.cs:15
int lastScore
Definition: LayerHoard.cs:29
CanvasGroup cg
Definition: LayerHoard.cs:17
float idleTimer
Definition: LayerHoard.cs:13
bool hasMouseMoved
Definition: LayerHoard.cs:35
UIText textScore
Definition: LayerHoard.cs:21
static void SayPic(Card c, string lang)
Definition: Msg.cs:171

References actor, HoardActor.actors, Hoard.Add(), cg, ELayer.debug, CoreDebug.enable, fadeSpeed, hasMouseMoved, Hoard.hiScore, hoard, idleTimer, CollectibleActor.item, lastScore, Hoard.maxSounds, Msg.Nerun(), HoardActor.psExplode, Reset(), Msg.SayPic(), Hoard.score, textScore, ELayer.ui, HoardActor.updates, and v.

◆ UpdateMousePos()

void LayerHoard.UpdateMousePos ( )
inlineprivate

Definition at line 151 of file LayerHoard.cs.

152 {
153 hasMouseMoved = (Input.mousePosition - lastMousePos).magnitude > 15f;
154 lastMousePos = Input.mousePosition;
155 }
Vector3 lastMousePos
Definition: LayerHoard.cs:33

References hasMouseMoved, and lastMousePos.

Member Data Documentation

◆ actor

HoardActor LayerHoard.actor

Definition at line 7 of file LayerHoard.cs.

Referenced by OnAfterInit(), OnClickConfig(), OnKill(), Reset(), and Update().

◆ autoList

bool LayerHoard.autoList

Definition at line 9 of file LayerHoard.cs.

◆ autoNum

int LayerHoard.autoNum

Definition at line 11 of file LayerHoard.cs.

◆ cg

CanvasGroup LayerHoard.cg

Definition at line 17 of file LayerHoard.cs.

Referenced by Update().

◆ debugButtons

UIButton [] LayerHoard.debugButtons

Definition at line 25 of file LayerHoard.cs.

Referenced by OnAfterInit().

◆ fadeSpeed

float LayerHoard.fadeSpeed

Definition at line 15 of file LayerHoard.cs.

Referenced by Update().

◆ hasMouseMoved

bool LayerHoard.hasMouseMoved
private

Definition at line 35 of file LayerHoard.cs.

Referenced by Update(), and UpdateMousePos().

◆ idleTimer

float LayerHoard.idleTimer

Definition at line 13 of file LayerHoard.cs.

Referenced by Update().

◆ lastMousePos

Vector3 LayerHoard.lastMousePos
private

Definition at line 33 of file LayerHoard.cs.

Referenced by UpdateMousePos().

◆ lastScore

int LayerHoard.lastScore
private

Definition at line 29 of file LayerHoard.cs.

Referenced by Update().

◆ layoutMenu

LayoutGroup LayerHoard.layoutMenu

Definition at line 27 of file LayerHoard.cs.

Referenced by OnAfterInit().

◆ textMode

UIText LayerHoard.textMode

Definition at line 19 of file LayerHoard.cs.

◆ textScore

UIText LayerHoard.textScore

Definition at line 21 of file LayerHoard.cs.

Referenced by Update().

◆ textTime

UIText LayerHoard.textTime

Definition at line 23 of file LayerHoard.cs.

◆ v

int LayerHoard.v

Definition at line 31 of file LayerHoard.cs.

Referenced by OnClickConfig(), and Update().

Property Documentation

◆ hoard

Hoard LayerHoard.hoard
get

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