-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackgroudEffect.cs
More file actions
558 lines (467 loc) · 11.8 KB
/
Copy pathBackgroudEffect.cs
File metadata and controls
558 lines (467 loc) · 11.8 KB
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
using System;
// Token: 0x02000032 RID: 50
public class BackgroudEffect
{
// Token: 0x06000216 RID: 534 RVA: 0x0000357C File Offset: 0x0000177C
public BackgroudEffect(int typeS)
{
}
// Token: 0x06000218 RID: 536 RVA: 0x0000484E File Offset: 0x00002A4E
public static void clearImage()
{
TileMap.yWater = 0;
}
// Token: 0x06000219 RID: 537 RVA: 0x00003868 File Offset: 0x00001A68
public static bool isHaveRain()
{
return false;
}
// Token: 0x0600021A RID: 538 RVA: 0x00003584 File Offset: 0x00001784
public static void initCloud()
{
}
// Token: 0x0600021B RID: 539 RVA: 0x00003584 File Offset: 0x00001784
public static void updateCloud2()
{
}
// Token: 0x0600021C RID: 540 RVA: 0x00003584 File Offset: 0x00001784
public static void updateFog()
{
}
// Token: 0x0600021D RID: 541 RVA: 0x00003584 File Offset: 0x00001784
public static void paintCloud2(mGraphics g)
{
}
// Token: 0x0600021E RID: 542 RVA: 0x00003584 File Offset: 0x00001784
public static void paintFog(mGraphics g)
{
}
// Token: 0x0600021F RID: 543 RVA: 0x000119F8 File Offset: 0x0000FBF8
private void reloadShip()
{
int cmx = GameScr.cmx;
int cmy = GameScr.cmy;
this.way = Res.random(1, 3);
this.isFly = false;
this.speed = Res.random(3, 5);
if (this.way == 1)
{
this.xShip = -50;
this.yShip = Res.random(cmy, GameCanvas.h - 100 + cmy);
this.trans = 0;
return;
}
if (this.way == 2)
{
this.xShip = TileMap.pxw + 50;
this.yShip = Res.random(cmy, GameCanvas.h - 100 + cmy);
this.trans = 2;
return;
}
if (this.way == 3)
{
this.xShip = Res.random(50 + cmx, GameCanvas.w - 50 + cmx);
this.yShip = -50;
this.trans = ((Res.random(0, 2) != 0) ? 2 : 0);
return;
}
if (this.way == 4)
{
this.xShip = Res.random(50 + cmx, GameCanvas.w - 50 + cmx);
this.yShip = TileMap.pxh + 50;
this.trans = ((Res.random(0, 2) != 0) ? 2 : 0);
}
}
// Token: 0x06000220 RID: 544 RVA: 0x00003584 File Offset: 0x00001784
public void paintWater(mGraphics g)
{
}
// Token: 0x06000221 RID: 545 RVA: 0x00003584 File Offset: 0x00001784
public void paintFar(mGraphics g)
{
}
// Token: 0x06000222 RID: 546 RVA: 0x00011B18 File Offset: 0x0000FD18
public void update()
{
switch (this.typeEff)
{
case 0:
case 12:
for (int i = 0; i < this.sum; i++)
{
if (i % 3 != 0 && this.typeEff != 12 && TileMap.tileTypeAt(this.x[i], this.y[i] - GameCanvas.transY, 2))
{
this.activeEff[i] = true;
}
if (i % 3 == 0 && this.y[i] > GameCanvas.h + GameScr.cmy)
{
this.x[i] = Res.random(-10, GameCanvas.w + 300) + GameScr.cmx;
this.y[i] = Res.random(-100, 0) + GameScr.cmy;
}
if (!this.activeEff[i])
{
this.y[i] += this.vy[i];
this.x[i] += this.vx[i];
}
if (this.activeEff[i])
{
this.t[i]++;
if (this.t[i] > 2)
{
this.frame[i]++;
this.t[i] = 0;
if (this.frame[i] > 1)
{
this.frame[i] = 0;
this.activeEff[i] = false;
this.x[i] = Res.random(-10, GameCanvas.w + 300) + GameScr.cmx;
this.y[i] = Res.random(-100, 0) + GameScr.cmy;
}
}
}
}
return;
case 1:
case 2:
case 5:
case 6:
case 7:
case 11:
for (int j = 0; j < this.sum; j++)
{
if (j % 3 != 0 && TileMap.tileTypeAt(this.x[j], this.y[j] + ((TileMap.tileID != 15) ? 0 : 10), 2))
{
this.activeEff[j] = true;
}
if (j % 3 == 0 && this.y[j] > TileMap.pxh)
{
this.x[j] = Res.random(-10, TileMap.pxw + 50);
this.y[j] = Res.random(-50, 0);
}
if (!this.activeEff[j])
{
for (int k = 0; k < Teleport.vTeleport.size(); k++)
{
Teleport teleport = (Teleport)Teleport.vTeleport.elementAt(k);
if (teleport != null && teleport.paintFire && this.x[j] < teleport.x + 80 && this.x[j] > teleport.x - 80 && this.y[j] < teleport.y + 80 && this.y[j] > teleport.y - 80)
{
this.x[j] += ((this.x[j] >= teleport.x) ? 10 : -10);
}
}
this.y[j] += this.vy[j];
this.x[j] += this.vx[j];
this.t[j]++;
int num = (this.typeEff != 11) ? 4 : 3;
if (this.t[j] > ((this.typeEff == 2) ? 4 : 2))
{
this.frame[j]++;
this.t[j] = 0;
if (this.frame[j] > num - 1)
{
this.frame[j] = 0;
}
}
}
else
{
this.t[j]++;
if (this.t[j] == 100)
{
this.t[j] = 0;
this.x[j] = Res.random(-10, TileMap.pxw + 50);
this.y[j] = Res.random(-50, 0);
this.activeEff[j] = false;
}
}
}
return;
case 3:
break;
case 4:
for (int l = 0; l < this.sum; l++)
{
this.t[l]++;
if (this.t[l] > 10)
{
this.tick[l]++;
this.t[l] = 0;
if (this.tick[l] > 5)
{
this.tick[l] = 0;
}
this.frame[l] = this.dem[this.tick[l]];
}
}
return;
case 8:
this.tFire++;
if (this.tFire == 3)
{
this.tFire = 0;
this.frameFire++;
if (this.frameFire > 1)
{
this.frameFire = 0;
}
}
if (GameCanvas.gameTick % this.tStart == 0)
{
this.isFly = true;
}
if (this.isFly)
{
if (this.way == 1)
{
this.xShip += this.speed;
if (this.xShip > TileMap.pxw + 50)
{
this.reloadShip();
return;
}
}
else if (this.way == 2)
{
this.xShip -= this.speed;
if (this.xShip < -50)
{
this.reloadShip();
return;
}
}
else if (this.way == 3)
{
this.yShip += this.speed;
if (this.yShip > TileMap.pxh + 50)
{
this.reloadShip();
return;
}
}
else if (this.way == 4)
{
this.yShip -= this.speed;
if (this.yShip < -50)
{
this.reloadShip();
return;
}
}
}
break;
case 9:
for (int m = 0; m < this.num; m++)
{
this.x[m] -= this.vx[m];
if (this.x[m] < -this.vx[m])
{
BackgroudEffect.wP[m] = Res.abs(Res.random(1, 3));
this.vx[m] = BackgroudEffect.wP[m];
this.x[m] = GameCanvas.w + this.vx[m];
}
}
return;
case 10:
for (int n = 0; n < this.num; n++)
{
this.x[n] -= this.vx[n];
if (this.x[n] < -this.vx[n] + GameScr.cmx)
{
this.x[n] = GameCanvas.w + this.vx[n] + GameScr.cmx;
}
}
return;
case 13:
BackgroudEffect.updateCloud2();
return;
case 14:
BackgroudEffect.updateFog();
break;
default:
return;
}
}
// Token: 0x06000223 RID: 547 RVA: 0x00003584 File Offset: 0x00001784
public void paintFront(mGraphics g)
{
}
// Token: 0x06000224 RID: 548 RVA: 0x00003584 File Offset: 0x00001784
public void paintLacay1(mGraphics g, Image img)
{
}
// Token: 0x06000225 RID: 549 RVA: 0x00003584 File Offset: 0x00001784
public void paintLacay2(mGraphics g, Image img)
{
}
// Token: 0x06000226 RID: 550 RVA: 0x00003584 File Offset: 0x00001784
public void paintBehindTile(mGraphics g)
{
}
// Token: 0x06000227 RID: 551 RVA: 0x00003584 File Offset: 0x00001784
public void paintBack(mGraphics g)
{
}
// Token: 0x06000228 RID: 552 RVA: 0x00003584 File Offset: 0x00001784
public static void addEffect(int id)
{
}
// Token: 0x06000229 RID: 553 RVA: 0x00003584 File Offset: 0x00001784
public static void addWater(int color, int yWater)
{
}
// Token: 0x0600022A RID: 554 RVA: 0x00003584 File Offset: 0x00001784
public static void paintWaterAll(mGraphics g)
{
}
// Token: 0x0600022B RID: 555 RVA: 0x00003584 File Offset: 0x00001784
public static void paintBehindTileAll(mGraphics g)
{
}
// Token: 0x0600022C RID: 556 RVA: 0x00003584 File Offset: 0x00001784
public static void paintFrontAll(mGraphics g)
{
}
// Token: 0x0600022D RID: 557 RVA: 0x00003584 File Offset: 0x00001784
public static void paintFarAll(mGraphics g)
{
}
// Token: 0x0600022E RID: 558 RVA: 0x00003584 File Offset: 0x00001784
public static void paintBackAll(mGraphics g)
{
}
// Token: 0x0600022F RID: 559 RVA: 0x00003584 File Offset: 0x00001784
public static void updateEff()
{
}
// Token: 0x04000205 RID: 517
public const int TYPE_MUA = 0;
// Token: 0x04000206 RID: 518
public const int TYPE_LATRAIDAT_1 = 1;
// Token: 0x04000207 RID: 519
public const int TYPE_LATRAIDAT_2 = 2;
// Token: 0x04000208 RID: 520
public const int TYPE_SAMSET = 3;
// Token: 0x04000209 RID: 521
public const int TYPE_SAO = 4;
// Token: 0x0400020A RID: 522
public const int TYPE_LANAMEK_1 = 5;
// Token: 0x0400020B RID: 523
public const int TYPE_LASAYAI_1 = 6;
// Token: 0x0400020C RID: 524
public const int TYPE_LANAMEK_2 = 7;
// Token: 0x0400020D RID: 525
public const int TYPE_SHIP_TRAIDAT = 8;
// Token: 0x0400020E RID: 526
public const int TYPE_HANHTINH = 9;
// Token: 0x0400020F RID: 527
public const int TYPE_WATER = 10;
// Token: 0x04000210 RID: 528
public const int TYPE_SNOW = 11;
// Token: 0x04000211 RID: 529
public const int TYPE_MUA_FRONT = 12;
// Token: 0x04000212 RID: 530
public const int TYPE_CLOUD = 13;
// Token: 0x04000213 RID: 531
public const int TYPE_FOG = 14;
// Token: 0x04000214 RID: 532
public static MyVector vBgEffect = new MyVector();
// Token: 0x04000215 RID: 533
private int[] x;
// Token: 0x04000216 RID: 534
private int[] y;
// Token: 0x04000217 RID: 535
private int[] vx;
// Token: 0x04000218 RID: 536
private int[] vy;
// Token: 0x04000219 RID: 537
public static int[] wP;
// Token: 0x0400021A RID: 538
private int num;
// Token: 0x0400021B RID: 539
private int xShip;
// Token: 0x0400021C RID: 540
private int yShip;
// Token: 0x0400021D RID: 541
private int way;
// Token: 0x0400021E RID: 542
private int trans;
// Token: 0x0400021F RID: 543
private int frameFire;
// Token: 0x04000220 RID: 544
private int tFire;
// Token: 0x04000221 RID: 545
private int tStart;
// Token: 0x04000222 RID: 546
private int speed;
// Token: 0x04000223 RID: 547
private bool isFly;
// Token: 0x04000224 RID: 548
public static Image imgSnow;
// Token: 0x04000225 RID: 549
public static Image imgHatMua;
// Token: 0x04000226 RID: 550
public static Image imgMua1;
// Token: 0x04000227 RID: 551
public static Image imgMua2;
// Token: 0x04000228 RID: 552
public static Image imgSao;
// Token: 0x04000229 RID: 553
private static Image imgLacay;
// Token: 0x0400022A RID: 554
private static Image imgShip;
// Token: 0x0400022B RID: 555
private static Image imgFire1;
// Token: 0x0400022C RID: 556
private static Image imgFire2;
// Token: 0x0400022D RID: 557
private int[] type;
// Token: 0x0400022E RID: 558
private int sum;
// Token: 0x0400022F RID: 559
public int typeEff;
// Token: 0x04000230 RID: 560
public int xx;
// Token: 0x04000231 RID: 561
public int waterY;
// Token: 0x04000232 RID: 562
private bool[] isRainEffect;
// Token: 0x04000233 RID: 563
private int[] frame;
// Token: 0x04000234 RID: 564
private int[] t;
// Token: 0x04000235 RID: 565
private bool[] activeEff;
// Token: 0x04000236 RID: 566
private int yWater;
// Token: 0x04000237 RID: 567
private int colorWater;
// Token: 0x04000238 RID: 568
public static Image water1 = GameCanvas.loadImage("/mainImage/myTexture2dwater1.png");
// Token: 0x04000239 RID: 569
public static Image water2 = GameCanvas.loadImage("/mainImage/myTexture2dwater2.png");
// Token: 0x0400023A RID: 570
public static Image imgChamTron1;
// Token: 0x0400023B RID: 571
public static Image imgChamTron2;
// Token: 0x0400023C RID: 572
public static bool isFog;
// Token: 0x0400023D RID: 573
public static bool isPaintFar;
// Token: 0x0400023E RID: 574
public static int nCloud;
// Token: 0x0400023F RID: 575
public static Image imgCloud1;
// Token: 0x04000240 RID: 576
public static Image imgFog;
// Token: 0x04000241 RID: 577
public static int cloudw;
// Token: 0x04000242 RID: 578
public static int xfog;
// Token: 0x04000243 RID: 579
public static int yfog;
// Token: 0x04000244 RID: 580
public static int fogw;
// Token: 0x04000245 RID: 581
private int[] dem;
// Token: 0x04000246 RID: 582
private int[] tick;
}