terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
FancyClassicPlayerResourcesDisplaySet.cs
Go to the documentation of this file.
1using System;
8
10{
11 // Token: 0x02000A80 RID: 2688
13 {
14 // Token: 0x170008AF RID: 2223
15 // (get) Token: 0x06004F6E RID: 20334 RVA: 0x0027A3C8 File Offset: 0x002785C8
16 // (set) Token: 0x06004F6F RID: 20335 RVA: 0x0027A3DC File Offset: 0x002785DC
17 public string NameKey
18 {
20 get
21 {
22 return this.<NameKey>k__BackingField;
23 }
25 private set
26 {
28 }
29 }
30
31 // Token: 0x170008B0 RID: 2224
32 // (get) Token: 0x06004F70 RID: 20336 RVA: 0x0027A3F0 File Offset: 0x002785F0
33 // (set) Token: 0x06004F71 RID: 20337 RVA: 0x0027A404 File Offset: 0x00278604
34 public string ConfigKey
35 {
37 get
38 {
39 return this.<ConfigKey>k__BackingField;
40 }
42 private set
43 {
45 }
46 }
47
48 // Token: 0x06004F72 RID: 20338 RVA: 0x0027A418 File Offset: 0x00278618
50 {
51 int num = 1;
52 base..ctor();
55 bool flag = configKey == "NewWithText";
56 this._drawText = num != 0;
57 string text = "Images\\UI\\PlayerResourceSets\\" + resourceFolderName;
58 string text2 = text + "\\Heart_Left";
59 }
60
61 // Token: 0x06004F73 RID: 20339 RVA: 0x0027A558 File Offset: 0x00278758
62 public void Draw()
63 {
64 if (!true)
65 {
66 }
68 this.PrepareFields(localPlayer);
69 }
70
71 // Token: 0x06004F74 RID: 20340 RVA: 0x0027A578 File Offset: 0x00278778
72 private void DrawLifeBar(SpriteBatch spriteBatch)
73 {
74 int screenWidth = Main.screenWidth;
75 bool drawText = this._drawText;
76 if (drawText)
77 {
78 if (!drawText)
79 {
80 }
81 }
82 if (this._heartCountRow1 == 0)
83 {
84 }
85 if (!true)
86 {
87 }
88 if (!true)
89 {
90 }
91 if (true)
92 {
93 return;
94 }
95 if (!true)
96 {
97 }
99 if (!true)
100 {
101 }
102 if (!true)
103 {
104 }
105 if (true)
106 {
107 return;
108 }
109 if (!true)
110 {
111 }
113 if (!true)
114 {
115 }
116 if (!true)
117 {
118 }
119 if (!true)
120 {
121 }
123 if (!true)
124 {
125 }
126 if (!true)
127 {
128 }
129 if (!true)
130 {
131 }
132 }
133
134 // Token: 0x06004F75 RID: 20341 RVA: 0x0027A5FC File Offset: 0x002787FC
135 private static void DrawLifeBarText(SpriteBatch spriteBatch, Vector2 topLeftAnchor)
136 {
137 int num = 17154;
138 if (num == 0)
139 {
140 }
141 if (num == 0)
142 {
143 }
145 string text;
146 string text2;
147 if ((" " == null || " " != null) && (text == null || text != null) && "/" != null && (text2 == null || text2 != null))
148 {
149 string text4;
150 string text5;
151 string text3 = text4 + "/" + text5;
152 string text7;
153 string text8;
154 string text6 = text7 + "/" + text8;
155 return;
156 }
157 throw new ArrayTypeMismatchException();
158 }
159
160 // Token: 0x06004F76 RID: 20342 RVA: 0x0027A678 File Offset: 0x00278878
161 private void DrawManaBar(SpriteBatch spriteBatch)
162 {
163 if (!true)
164 {
165 }
166 int screenWidth = Main.screenWidth;
167 if (this._starCount == 0)
168 {
169 }
170 if (!true)
171 {
172 }
173 if (!true)
174 {
175 }
176 if (true)
177 {
178 return;
179 }
180 if (!true)
181 {
182 }
183 int starCount = this._starCount;
184 if (!true)
185 {
186 }
187 if (!true)
188 {
189 }
190 if (!true)
191 {
192 }
193 }
194
195 // Token: 0x06004F77 RID: 20343 RVA: 0x0027A6BC File Offset: 0x002788BC
196 private static void DrawManaText(SpriteBatch spriteBatch)
197 {
198 int num = 1;
199 if (num == 0)
200 {
201 }
202 if (num == 0)
203 {
204 }
205 }
206
207 // Token: 0x06004F78 RID: 20344 RVA: 0x0027A6F0 File Offset: 0x002788F0
208 private void HeartPanelDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset<Texture2D> sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
209 {
210 if (!true)
211 {
212 }
213 if (!true)
214 {
215 }
216 offset.X = (float)1;
218 sourceRect.hasValue = 16256 != 0;
220 }
221
222 // Token: 0x06004F79 RID: 20345 RVA: 0x0027A750 File Offset: 0x00278950
223 private void HeartFillingDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset<Texture2D> sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
224 {
225 if (!true)
226 {
227 }
228 if (!true)
229 {
230 }
234 float lifePerHeart = this._lifePerHeart;
236 float cursorScale = Main.cursorScale;
237 }
238
239 // Token: 0x06004F7A RID: 20346 RVA: 0x0027A794 File Offset: 0x00278994
240 private void StarPanelDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset<Texture2D> sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
241 {
242 if (!true)
243 {
244 }
245 if (!true)
246 {
247 }
248 offset.X = (float)1;
250 sourceRect.hasValue = 16256 != 0;
252 }
253
254 // Token: 0x06004F7B RID: 20347 RVA: 0x0027A7E4 File Offset: 0x002789E4
255 private void StarFillingDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset<Texture2D> sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
256 {
257 if (!true)
258 {
259 }
260 if (!true)
261 {
262 }
264 float manaPerStar = this._manaPerStar;
266 if (starFill == null)
267 {
268 }
270 float cursorScale = Main.cursorScale;
271 }
272
273 // Token: 0x06004F7C RID: 20348 RVA: 0x0027A824 File Offset: 0x00278A24
274 private void PrepareFields(Player player)
275 {
276 int num = 1;
277 this._manaPerStar = (float)num;
278 if (num == 0)
279 {
280 }
281 float lifePerHeart = this._lifePerHeart;
282 float lifePerHeart2 = this._lifePerHeart;
285 float manaPerStar = this._manaPerStar;
289 }
290
291 // Token: 0x06004F7D RID: 20349 RVA: 0x0027A878 File Offset: 0x00278A78
292 public void TryToHover()
293 {
294 if (this._hoverLife)
295 {
297 }
298 if (this._hoverMana)
299 {
301 return;
302 }
303 }
304
305 // Token: 0x04008852 RID: 34898
306 private float _currentPlayerLife;
307
308 // Token: 0x04008853 RID: 34899
309 private float _lifePerHeart;
310
311 // Token: 0x04008854 RID: 34900
313
314 // Token: 0x04008855 RID: 34901
316
317 // Token: 0x04008856 RID: 34902
319
320 // Token: 0x04008857 RID: 34903
321 private int _heartCountRow1;
322
323 // Token: 0x04008858 RID: 34904
324 private int _heartCountRow2;
325
326 // Token: 0x04008859 RID: 34905
327 private int _starCount;
328
329 // Token: 0x0400885A RID: 34906
331
332 // Token: 0x0400885B RID: 34907
333 private float _manaPerStar;
334
335 // Token: 0x0400885C RID: 34908
336 private float _currentPlayerMana;
337
338 // Token: 0x0400885D RID: 34909
340
341 // Token: 0x0400885E RID: 34910
343
344 // Token: 0x0400885F RID: 34911
346
347 // Token: 0x04008860 RID: 34912
349
350 // Token: 0x04008861 RID: 34913
352
353 // Token: 0x04008862 RID: 34914
355
356 // Token: 0x04008863 RID: 34915
358
359 // Token: 0x04008864 RID: 34916
361
362 // Token: 0x04008865 RID: 34917
364
365 // Token: 0x04008866 RID: 34918
367
368 // Token: 0x04008867 RID: 34919
370
371 // Token: 0x04008868 RID: 34920
373
374 // Token: 0x04008869 RID: 34921
375 private bool _hoverLife;
376
377 // Token: 0x0400886A RID: 34922
378 private bool _hoverMana;
379
380 // Token: 0x0400886B RID: 34923
381 private bool _drawText;
382
383 // Token: 0x0400886C RID: 34924
385 private string <NameKey>k__BackingField;
386
387 // Token: 0x0400886D RID: 34925
389 private string <ConfigKey>k__BackingField;
390 }
391}
class f__AnonymousType0<< Count > j__TPar
void HeartPanelDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset< Texture2D > sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
void StarPanelDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset< Texture2D > sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
FancyClassicPlayerResourcesDisplaySet(string nameKey, string configKey, string resourceFolderName, AssetRequestMode mode)
void HeartFillingDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset< Texture2D > sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
void StarFillingDrawer(int elementIndex, int firstElementIndex, int lastElementIndex, [Out] Asset< Texture2D > sprite, [Out] Vector2 offset, [Out] float drawScale, [Out] Rectangle? sourceRect)
static float cursorScale
Definition Main.cs:3287
static int screenWidth
Definition Main.cs:2001
static Player LocalPlayer
Definition Main.cs:5267