blob: b4ef2fecd6e81d598b53ad5c6c13877733679b21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
using System;
using System.Collections.Generic;
using UILib;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XShowGetAchivementTipView : DlgBase<XShowGetAchivementTipView, XShowGetAchivementTipBehaviour>
{
public XShowGetAchivementTipView.State state
{
get
{
return this._state;
}
set
{
this._state = value;
this.m_uiBehaviour.m_Bg.SetActive(value == XShowGetAchivementTipView.State.Silver);
this.m_uiBehaviour.m_Bg2.SetActive(value == XShowGetAchivementTipView.State.Gold);
}
}
public override string fileName
{
get
{
return "GameSystem/ShowAchivementTipDlg";
}
}
public override bool autoload
{
get
{
return true;
}
}
public override bool needOnTop
{
get
{
return true;
}
}
public Queue<TipNode> queue = new Queue<TipNode>();
private XShowGetAchivementTipView.State _state = XShowGetAchivementTipView.State.Silver;
private XShowGetAchivementTipDocument _doc = null;
public enum State
{
Silver,
Gold
}
protected override void Init()
{
base.Init();
this._doc = XDocuments.GetSpecificDocument<XShowGetAchivementTipDocument>(XShowGetAchivementTipDocument.uuID);
}
protected override void OnShow()
{
base.uiBehaviour.m_Bg.SetActive(false);
}
protected override void OnUnload()
{
}
public void ShowUI()
{
bool flag = this.queue.Count <= 0;
if (!flag)
{
this.SetVisible(true, true);
TipNode tipNode = this.queue.Peek();
bool flag2 = tipNode.type == 0;
if (flag2)
{
AchievementV2Table.RowData rowData = tipNode.data as AchievementV2Table.RowData;
bool flag3 = rowData.GainShowIcon != 0;
if (flag3)
{
this.state = XShowGetAchivementTipView.State.Silver;
base.uiBehaviour.m_AchivementName.SetText(rowData.Achievement);
base.uiBehaviour.m_AchivementText.SetText(rowData.Explanation);
}
else
{
this.state = XShowGetAchivementTipView.State.Gold;
base.uiBehaviour.m_AchivementName2.SetText(rowData.Achievement);
base.uiBehaviour.m_AchivementText2.SetText(rowData.Explanation);
}
}
else
{
bool flag4 = tipNode.type == 1;
if (flag4)
{
DesignationTable.RowData rowData2 = tipNode.data as DesignationTable.RowData;
bool flag5 = rowData2.GainShowIcon != 0;
if (flag5)
{
this.state = XShowGetAchivementTipView.State.Silver;
base.uiBehaviour.m_AchivementName.SetText(rowData2.Designation);
base.uiBehaviour.m_AchivementText.SetText(rowData2.Explanation);
}
else
{
this.state = XShowGetAchivementTipView.State.Gold;
base.uiBehaviour.m_AchivementName2.SetText(rowData2.Designation);
base.uiBehaviour.m_AchivementText2.SetText(rowData2.Explanation);
}
}
}
bool flag6 = this.state == XShowGetAchivementTipView.State.Silver;
if (flag6)
{
IXUITweenTool ixuitweenTool = base.uiBehaviour.m_Bg.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
ixuitweenTool.SetTargetGameObject(base.uiBehaviour.m_Bg);
ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
ixuitweenTool.PlayTween(true, -1f);
}
else
{
IXUITweenTool ixuitweenTool2 = base.uiBehaviour.m_Bg2.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
ixuitweenTool2.SetTargetGameObject(base.uiBehaviour.m_Bg2);
ixuitweenTool2.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
ixuitweenTool2.PlayTween(true, -1f);
}
}
}
public void Show(AchievementV2Table.RowData data)
{
bool flag = this.queue.Count > 0;
if (flag)
{
TipNode tipNode = new TipNode();
tipNode.data = data;
tipNode.type = 0;
this.queue.Enqueue(tipNode);
}
else
{
TipNode tipNode2 = new TipNode();
tipNode2.data = data;
tipNode2.type = 0;
this.queue.Enqueue(tipNode2);
bool flag2 = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
if (flag2)
{
this.ShowUI();
}
}
}
public void ShowDesignation(DesignationTable.RowData data)
{
bool flag = this.queue.Count > 0;
if (flag)
{
TipNode tipNode = new TipNode();
tipNode.data = data;
tipNode.type = 1;
this.queue.Enqueue(tipNode);
}
else
{
TipNode tipNode2 = new TipNode();
tipNode2.data = data;
tipNode2.type = 1;
this.queue.Enqueue(tipNode2);
bool flag2 = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
if (flag2)
{
this.ShowUI();
}
}
}
public void ShowTip(AchivementTable.RowData date)
{
this.state = XShowGetAchivementTipView.State.Silver;
bool flag = date.AchievementIcon != null;
if (flag)
{
base.uiBehaviour.m_AchivementName.SetText(date.AchievementName);
}
base.uiBehaviour.m_AchivementName.SetText(date.AchievementName);
base.uiBehaviour.m_AchivementText.SetText(date.AchievementDescription);
IXUITweenTool ixuitweenTool = base.uiBehaviour.m_Bg.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
ixuitweenTool.SetTargetGameObject(base.uiBehaviour.m_Bg);
ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
ixuitweenTool.PlayTween(true, -1f);
}
public void OnPlayTweenFinish(IXUITweenTool iPlayTween)
{
this.queue.Dequeue();
bool flag = this.queue.Count > 0;
if (flag)
{
this.ShowUI();
}
else
{
base.uiBehaviour.m_Bg.SetActive(false);
this.SetVisible(false, true);
}
}
protected override void OnHide()
{
this.queue.Clear();
}
}
}
|