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

Public Member Functions

void SetChara (Chara c, LayerGachaResult _layer)
 
int GetMedal ()
 
void Confirm (bool add)
 

Public Attributes

UIButton buttonGet
 
UIButton buttonDump
 
Portrait portrait
 
Chara chara
 
UIText textName
 
UIText textBio
 
UIText textJob
 
UIText textDetail
 
UIText textResult
 
UIText textHobby
 
UIText textWork
 
UIText textLifeStyle
 
LayerGachaResult layer
 
LayoutGroup layoutTag
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- 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]
 

Detailed Description

Definition at line 4 of file ItemGachaResult.cs.

Member Function Documentation

◆ Confirm()

void ItemGachaResult.Confirm ( bool  add)
inline

Definition at line 80 of file ItemGachaResult.cs.

81 {
82 textResult.SetActive(enable: true);
83 textResult.SetText(add ? "Get!" : "Discarded", add ? FontColor.Good : FontColor.Bad);
84 buttonDump.SetActive(enable: false);
85 buttonGet.SetActive(enable: false);
86 layer.items.Remove(this);
87 if (add)
88 {
90 Msg.Say("gachaAdd", chara);
91 }
92 else
93 {
94 EMono.pc.ModCurrency(GetMedal(), "medal");
95 }
96 if (layer.items.Count == 0)
97 {
98 layer.Close();
99 }
100 }
FontColor
Definition: FontColor.cs:2
void ModCurrency(int a, string id="money")
Definition: Card.cs:3638
Definition: EMono.cs:4
static Faction Home
Definition: EMono.cs:25
static Chara pc
Definition: EMono.cs:13
void AddReserve(Chara c)
Definition: FACTION.cs:325
UIButton buttonGet
LayerGachaResult layer
UIButton buttonDump
List< ItemGachaResult > items
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
void SetText(string s)
Definition: UIText.cs:159

References Faction.AddReserve(), buttonDump, buttonGet, chara, Layer.Close(), GetMedal(), EMono.Home, LayerGachaResult.items, layer, Card.ModCurrency(), EMono.pc, Msg.Say(), UIText.SetText(), and textResult.

Referenced by LayerGachaResult.PlayGacha().

◆ GetMedal()

int ItemGachaResult.GetMedal ( )
inline

Definition at line 75 of file ItemGachaResult.cs.

76 {
77 return 1;
78 }

Referenced by Confirm(), and SetChara().

◆ SetChara()

void ItemGachaResult.SetChara ( Chara  c,
LayerGachaResult  _layer 
)
inline

Definition at line 34 of file ItemGachaResult.cs.

35 {
36 layer = _layer;
37 chara = c;
39 if (c.IsPCC)
40 {
41 portrait.imageChara.transform.localScale = new Vector3(1.4f, 1.4f, 1f);
42 portrait.imageChara.rectTransform.anchoredPosition = new Vector2(45f, -120f);
43 }
44 textName.text = c.NameBraced;
45 textJob.text = c.job.GetName();
46 textBio.text = c.bio.TextBio(c);
47 foreach (Element e in c.elements.ListBestSkills())
48 {
49 HintIcon hintIcon = Util.Instantiate<HintIcon>("UI/Element/Item/Tag Skill", layoutTag);
50 hintIcon.text.SetText(e.Name);
51 hintIcon.text2.SetText(e.Value.ToString() ?? "");
52 hintIcon.tooltip.onShowTooltip = delegate(UITooltip t)
53 {
55 };
56 hintIcon.RebuildLayout();
57 }
58 textResult.SetActive(enable: false);
59 buttonGet.onClick.AddListener(delegate
60 {
61 EMono.Sound.Play("good");
62 Confirm(add: true);
63 });
64 buttonDump.tooltip.text = "gachaDump".lang(GetMedal().ToString() ?? "");
65 buttonDump.onClick.AddListener(delegate
66 {
67 EMono.Sound.Play("pay");
68 Confirm(add: false);
69 });
70 textHobby.text = c.GetTextHobby();
71 textWork.text = c.GetTextWork();
72 textLifeStyle.text = "lifestyle".lang() + ": " + ("lifestyle_" + c.idTimeTable).lang();
73 }
string TextBio(Chara c)
Definition: Biography.cs:479
ElementContainerCard elements
Definition: Card.cs:37
Biography bio
Definition: Card.cs:40
SourceJob.Row job
Definition: Chara.cs:451
string NameBraced
Definition: Chara.cs:499
string idTimeTable
Definition: Chara.cs:453
string GetTextWork(bool simple=false)
Definition: Chara.cs:8235
override bool IsPCC
Definition: Chara.cs:667
string GetTextHobby(bool simple=false)
Definition: Chara.cs:8225
static SoundManager Sound
Definition: EMono.cs:39
List< Element > ListBestSkills()
int Value
Definition: ELEMENT.cs:282
virtual string Name
Definition: ELEMENT.cs:294
void WriteNote(UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
Definition: ELEMENT.cs:574
UIText text
Definition: HintIcon.cs:9
UIText text2
Definition: HintIcon.cs:11
LayoutGroup layoutTag
void SetChara(Chara c, PCCData pccData=null)
Definition: Portrait.cs:138
UINote note
Definition: UITooltip.cs:21
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References Card.bio, buttonDump, buttonGet, chara, Confirm, Card.elements, GetMedal(), Chara.IsPCC, Chara.job, layer, layoutTag, Element.Name, Chara.NameBraced, UITooltip.note, portrait, Portrait.SetChara(), UIText.SetText(), EMono.Sound, HintIcon.text, HintIcon.text2, Biography.TextBio(), textResult, Util, Element.Value, and Element.WriteNote().

Referenced by LayerGachaResult.PlayGacha().

Member Data Documentation

◆ buttonDump

UIButton ItemGachaResult.buttonDump

Definition at line 8 of file ItemGachaResult.cs.

Referenced by Confirm(), and SetChara().

◆ buttonGet

UIButton ItemGachaResult.buttonGet

Definition at line 6 of file ItemGachaResult.cs.

Referenced by Confirm(), and SetChara().

◆ chara

Chara ItemGachaResult.chara

Definition at line 12 of file ItemGachaResult.cs.

Referenced by Confirm(), and SetChara().

◆ layer

LayerGachaResult ItemGachaResult.layer

Definition at line 30 of file ItemGachaResult.cs.

Referenced by Confirm(), and SetChara().

◆ layoutTag

LayoutGroup ItemGachaResult.layoutTag

Definition at line 32 of file ItemGachaResult.cs.

Referenced by SetChara().

◆ portrait

Portrait ItemGachaResult.portrait

Definition at line 10 of file ItemGachaResult.cs.

Referenced by SetChara().

◆ textBio

UIText ItemGachaResult.textBio

Definition at line 16 of file ItemGachaResult.cs.

◆ textDetail

UIText ItemGachaResult.textDetail

Definition at line 20 of file ItemGachaResult.cs.

◆ textHobby

UIText ItemGachaResult.textHobby

Definition at line 24 of file ItemGachaResult.cs.

◆ textJob

UIText ItemGachaResult.textJob

Definition at line 18 of file ItemGachaResult.cs.

◆ textLifeStyle

UIText ItemGachaResult.textLifeStyle

Definition at line 28 of file ItemGachaResult.cs.

◆ textName

UIText ItemGachaResult.textName

Definition at line 14 of file ItemGachaResult.cs.

◆ textResult

UIText ItemGachaResult.textResult

Definition at line 22 of file ItemGachaResult.cs.

Referenced by Confirm(), and SetChara().

◆ textWork

UIText ItemGachaResult.textWork

Definition at line 26 of file ItemGachaResult.cs.


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