Elin Modding Docs Doc
Loading...
Searching...
No Matches
ItemHomeResource.cs
1using System;
2using UnityEngine.UI;
3
4// Token: 0x02000553 RID: 1363
5public class ItemHomeResource : EMono
6{
7 // Token: 0x06002504 RID: 9476 RVA: 0x000D1980 File Offset: 0x000CFB80
8 public void SetResource(BaseHomeResource _r)
9 {
10 BaseHomeResource.ResourceGroup group = _r.Group;
11 if (group != BaseHomeResource.ResourceGroup.Currency)
12 {
13 if (group != BaseHomeResource.ResourceGroup.Rate)
14 {
15 this.button.mainText.text = "Lv." + _r.value.ToString();
16 this.button.subText.SetActive(false);
17 }
18 else
19 {
20 HomeResourceRate homeResourceRate = _r as HomeResourceRate;
21 int num = homeResourceRate.value - homeResourceRate.lastValue;
22 if (num != 0)
23 {
24 }
25 string str = "";
26 if (num > 0)
27 {
28 str = "↑".TagColor(FontColor.Good, null);
29 }
30 else if (num < 0)
31 {
32 str = "↓".TagColor(FontColor.Bad, null);
33 }
34 string text = homeResourceRate.value.ToString() + " " + str;
35 this.button.mainText.text = text;
36 this.button.subText.SetActive(false);
37 }
38 }
39 else
40 {
41 HomeResource homeResource = _r as HomeResource;
42 int num2 = homeResource.value - homeResource.lastValue;
43 int num3 = (num2 == 0) ? 4 : ((num2 > 0) ? 5 : 6);
44 string text2 = homeResource.value.ToString() ?? "";
45 if (homeResource.value < 0)
46 {
47 text2 = text2.TagColor(FontColor.Bad, null);
48 }
49 string text3 = text2;
50 this.button.mainText.text = text3;
51 FontColor c = (num2 == 0) ? FontColor.Passive : ((num2 > 0) ? FontColor.Good : FontColor.Bad);
52 this.button.subText.text = ((((num2 > 0) ? "+" : "") + num2.ToString()).TagColor(c, null) + "dailyIncome".lang()).TagSize(13);
53 }
54 this.imageExp.SetActive(_r.IsSkill);
55 this.imageExp.fillAmount = _r.ExpRatio;
56 this.button.icon.sprite = _r.Sprite;
57 this.button.tooltip.onShowTooltip = delegate(UITooltip tp)
58 {
59 _r.WriteNote(tp.note);
60 };
61 }
62
63 // Token: 0x04001491 RID: 5265
64 public UIButton button;
65
66 // Token: 0x04001492 RID: 5266
67 public Image imageExp;
68}
Definition EMono.cs:6