Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WidgetExpHome.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class WidgetExpHome : Widget
4{
5 public class Extra
6 {
7 public bool lv;
8
9 public bool knowledge;
10
11 public bool influence;
12 }
13
14 public GameObject goLv;
15
16 public UIText textLv;
17
19
21
23
24 public Extra extra => base.config.extra as Extra;
25
26 public override object CreateExtra()
27 {
28 return new Extra();
29 }
30
31 public override void OnActivate()
32 {
33 Build();
34 InvokeRepeating("Refresh", 0.5f, 0.5f);
35 }
36
37 public void Build()
38 {
39 this.RebuildLayout();
40 Refresh();
41 }
42
43 public void OnClick()
44 {
45 if (EMono.ui.BlockInput)
46 {
47 SE.BeepSmall();
48 return;
49 }
50 LayerChara layerChara = EMono.ui.ToggleLayer<LayerChara>();
51 if ((bool)layerChara)
52 {
53 layerChara.SetChara(EMono.pc).windows[0].SwitchContent(2);
54 layerChara.windowChara.ToggleFeatMode();
55 }
56 }
57
58 public void Refresh()
59 {
60 goLv.SetActive(EMono.pc.feat > 0);
61 textLv.text = EMono.pc.feat.ToString() ?? "";
62 itemExp.text1.text = EMono.pc.exp + "/" + EMono.pc.ExpToNext;
63 itemExp.image1.fillAmount = (float)EMono.pc.exp / (float)EMono.pc.ExpToNext + 0.01f;
64 }
65}
int ExpToNext
Definition: Card.cs:1884
int exp
Definition: Card.cs:382
int feat
Definition: Card.cs:358
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static UI ui
Definition: EMono.cs:15
LayerChara SetChara(Chara c)
Definition: LayerChara.cs:9
WindowChara windowChara
Definition: LayerChara.cs:5
List< Window > windows
Definition: Layer.cs:116
Definition: UIItem.cs:5
Definition: UIText.cs:6
override object CreateExtra()
UIItem itemInfluence
UIItem itemKnowledge
GameObject goLv
override void OnActivate()
Definition: Widget.cs:7
void ToggleFeatMode()
Definition: WindowChara.cs:237