forked from moto2002/mobahero_src
/
AchievementView.cs
1903 lines (1683 loc) · 67.8 KB
/
AchievementView.cs
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
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Assets.Scripts.Model;
using Com.Game.Data;
using Com.Game.Manager;
using Com.Game.Module;
using Com.Game.Utils;
using ExitGames.Client.Photon;
using GUIFramework;
using MobaProtocol;
using MobaProtocol.Data;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using UnityEngine;
public class AchievementView : BaseView<AchievementView>
{
private Transform leftAnchor;
private Transform centerAnchor;
private Transform rightAnchor;
private Transform mainBtn;
public Transform historyBtn;
private Transform honorBtn;
private Transform momentBtn;
private Transform heroesBtn;
private Transform abilityBtn;
private UISprite mainPic;
private UISprite historyPic;
private UISprite honorPic;
private UISprite momentPic;
private UISprite heroPic;
private UISprite abilityPic;
private UILabel mainTex;
private UILabel historyTex;
private UILabel honorTex;
private UILabel momentTex;
private UILabel heroTex;
private UILabel abilityTex;
private UIPanel mainPanel;
private UIPanel historyPanel;
private UIPanel honorPanel;
private UIPanel momentPanel;
private UIPanel heroesPanel;
private UIPanel abilityPanel;
private UITexture myPortrait;
private UILabel myName;
private UILabel myRank;
private UILabel like;
private UILabel achievCount;
private UILabel KDA;
private UILabel K_D_A;
private UILabel JDDZCount;
private UILabel LZXFCount;
private UILabel SDDLDCount;
private UILabel JJCCount;
private UILabel JDDZPercent;
private UILabel LZXFPercent;
private UILabel SDDLDPercent;
private UILabel JJCPercent;
private UISprite JDDZBar;
private UISprite LZXFBar;
private UISprite SDDLDBar;
private UISprite JJCBar;
private UISprite badge;
private UILabel scoreNum;
private UILabel tripleKill;
private UILabel quataryKill;
private UILabel pentaKill;
private UILabel legendary;
private UITexture hero1;
private UITexture hero2;
private UITexture hero3;
private Transform heroGrid;
private Transform noHero;
private Transform VBtnInMain;
public Transform VBtnInHistory;
public Transform VBtnPanel;
private Transform vBtnL;
private Transform vBtnR;
private Transform btn5;
private Transform btn10;
private Transform btn15;
private Transform btn20;
private Transform bg1;
private Transform nextPage;
private Transform xiba;
private Transform noRecord;
private UISprite bg;
private UILabel page;
private UILabel pageNum;
private Transform btnVR;
private Transform btnVL;
private UILabel title;
private UILabel time;
private Transform detailBtn;
private Transform closeDetailBtn;
private Transform AnalysisPanel;
private UIGrid dtl_blueGrid;
private UIGrid dtl_redGrid;
private UIGrid dtl_greenGrid;
private UILabel dtl_date;
private UILabel dtl_startTime;
private UILabel dtl_timeLength;
private UILabel dtl_type;
private UILabel dtl_killCount;
private UILabel dtl_money;
public UISprite dtl_vectory;
private UISprite bg0;
private UIGrid mainBattleRecordGrid;
private UIGrid historyAllBattleRecordGrid;
private UIGrid historyBlueGrid;
private UIGrid historyRedGrid;
private UIGrid historyGreenGrid;
private Transform allBtn;
private Transform pentaBtn;
private Transform quataryBtn;
private Transform tripleBtn;
private Transform legendaryBtn;
private UIGrid picGrid;
private BattleRecord _battleRecordItem;
private PlayerBattleItem _playerBattleItem;
private PlayerBattleDetailsItem _playerBattleDetailsItem;
private MyHeroItem _myHeroItem;
private ScreenShotItem _myHonorItem;
private KDAData recordData;
private SysHeroMainVo herovo;
private BattleMaxInfo maxInfo = new BattleMaxInfo();
private List<KdaUserHonorData> honorDataList = new List<KdaUserHonorData>();
private bool haveClickMain;
private bool haveClickHistory;
private int battleCount;
private double killCount;
private double deathCount;
private double assistantCount;
private double winPercent;
private int winCount;
public int vBtn = 1;
public int vBtnInMain = 1;
private int btnV;
public int AllCount;
public int AllCountInMain;
public string battleID = string.Empty;
public int PageNum = 1;
public int PageNumInMain = 1;
private Dictionary<int, List<heroRecordInfo>> myBattleDic = new Dictionary<int, List<heroRecordInfo>>();
public bool isInMainPanel = true;
public Dictionary<long, heroRecordInfo> heroRecordDic = new Dictionary<long, heroRecordInfo>();
public Dictionary<long, heroRecordInfo> heroRecordListInMain = new Dictionary<long, heroRecordInfo>();
public string chooseBattleName = string.Empty;
private List<MemberBattleInfo> teaminfo = new List<MemberBattleInfo>();
private List<MemberBattleInfo> team1 = new List<MemberBattleInfo>();
private List<MemberBattleInfo> team2 = new List<MemberBattleInfo>();
private List<MemberBattleInfo> team3 = new List<MemberBattleInfo>();
private Transform myHeros;
private UILabel hero_all;
private UILabel hero_own;
private UILabel skin_all;
private UILabel skin_own;
private UIGrid myHero_grid;
private UIScrollView mHeroPanel_ScrollView;
private Transform myHeros_noRecord;
private UILabel topKeepWin;
private UILabel topKill;
private UILabel topMoney;
private UILabel topKillMonster;
private UILabel topKeepKill;
private UILabel topAssist;
private UILabel topDamage;
private UILabel topBeDamage;
private UILabel topKda;
private UILabel totalMvp;
private Double_Mesh plane;
private Mesh_Circle line;
private Transform shareBtn;
private KdaAbilityGraph abilityGraph;
private CoroutineManager coroutineManager = new CoroutineManager();
private List<heroRecordInfo> pvpBattleInfo = new List<heroRecordInfo>();
private GameObject temp;
private int count = 1;
public GameObject oobj;
private HistoryBattleData currbattleRecord;
private string lastName;
public AchievementView()
{
this.WinResCfg = new WinResurceCfg(true, false, "Prefab/UI/Achievement/AchievementView");
this.WindowTitle = LanguageManager.Instance.GetStringById("Combatgains_Describe_Theme", "我的战绩");
}
public override void Init()
{
base.Init();
this.leftAnchor = this.transform.Find("LeftAnchor");
this.centerAnchor = this.transform.Find("CenterAnchor");
this.rightAnchor = this.transform.Find("RightAnchor");
this.mainBtn = this.leftAnchor.Find("Panel/Grid/MainAchieve");
this.historyBtn = this.leftAnchor.Find("Panel/Grid/HistoryAchieve");
this.honorBtn = this.leftAnchor.Find("Panel/Grid/Honor");
this.momentBtn = this.leftAnchor.Find("Panel/Grid/Moment");
this.heroesBtn = this.leftAnchor.Find("Panel/Grid/MyHeroes");
this.abilityBtn = this.leftAnchor.Find("Panel/Grid/BattleAbility");
this.mainPic = this.mainBtn.Find("Pic").GetComponent<UISprite>();
this.historyPic = this.historyBtn.Find("Pic").GetComponent<UISprite>();
this.honorPic = this.honorBtn.Find("Pic").GetComponent<UISprite>();
this.momentPic = this.momentBtn.Find("Pic").GetComponent<UISprite>();
this.heroPic = this.heroesBtn.Find("Pic").GetComponent<UISprite>();
this.abilityPic = this.abilityBtn.Find("Pic").GetComponent<UISprite>();
this.mainTex = this.mainBtn.Find("Label").GetComponent<UILabel>();
this.historyTex = this.historyBtn.Find("Label").GetComponent<UILabel>();
this.honorTex = this.honorBtn.Find("Label").GetComponent<UILabel>();
this.momentTex = this.momentBtn.Find("Label").GetComponent<UILabel>();
this.heroTex = this.heroesBtn.Find("Label").GetComponent<UILabel>();
this.abilityTex = this.abilityBtn.Find("Label").GetComponent<UILabel>();
this.mainPanel = this.centerAnchor.Find("MainPanel").GetComponent<UIPanel>();
this.historyPanel = this.centerAnchor.Find("HistoryPanel").GetComponent<UIPanel>();
this.honorPanel = this.centerAnchor.Find("HonorPanel").GetComponent<UIPanel>();
this.momentPanel = this.centerAnchor.Find("MomentPanel").GetComponent<UIPanel>();
this.heroesPanel = this.centerAnchor.Find("MyHeroesPanel").GetComponent<UIPanel>();
this.abilityPanel = this.centerAnchor.Find("AbilityPanel").GetComponent<UIPanel>();
this.myPortrait = this.centerAnchor.Find("MainPanel/SummonerInfo/Texture").GetComponent<UITexture>();
this.myName = this.centerAnchor.Find("MainPanel/SummonerInfo/Name").GetComponent<UILabel>();
this.like = this.centerAnchor.Find("MainPanel/SummonerInfo/Like/LikeCount").GetComponent<UILabel>();
this.myRank = this.centerAnchor.Find("MainPanel/SummonerInfo/Frame/rank").GetComponent<UILabel>();
this.achievCount = this.centerAnchor.Find("MainPanel/SummonerInfo/BattelRecord/Count").GetComponent<UILabel>();
this.KDA = this.centerAnchor.Find("MainPanel/30DayKDA/KDA").GetComponent<UILabel>();
this.K_D_A = this.centerAnchor.Find("MainPanel/30DayKDA/kda").GetComponent<UILabel>();
this.JDDZCount = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JDDZ/Bg/Count").GetComponent<UILabel>();
this.JDDZPercent = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JDDZ/Bg/Percent").GetComponent<UILabel>();
this.JDDZBar = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JDDZ/Bg/Bar").GetComponent<UISprite>();
this.LZXFCount = this.centerAnchor.Find("MainPanel/BattleType/BarChart/LZXF/Bg/Count").GetComponent<UILabel>();
this.LZXFPercent = this.centerAnchor.Find("MainPanel/BattleType/BarChart/LZXF/Bg/Percent").GetComponent<UILabel>();
this.LZXFBar = this.centerAnchor.Find("MainPanel/BattleType/BarChart/LZXF/Bg/Bar").GetComponent<UISprite>();
this.SDDLDCount = this.centerAnchor.Find("MainPanel/BattleType/BarChart/SDDLD/Bg/Count").GetComponent<UILabel>();
this.SDDLDPercent = this.centerAnchor.Find("MainPanel/BattleType/BarChart/SDDLD/Bg/Percent").GetComponent<UILabel>();
this.SDDLDBar = this.centerAnchor.Find("MainPanel/BattleType/BarChart/SDDLD/Bg/Bar").GetComponent<UISprite>();
this.JJCCount = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JJC/Bg/Count").GetComponent<UILabel>();
this.JJCPercent = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JJC/Bg/Percent").GetComponent<UILabel>();
this.JJCBar = this.centerAnchor.Find("MainPanel/BattleType/BarChart/JJC/Bg/Bar").GetComponent<UISprite>();
this.badge = this.centerAnchor.Find("MainPanel/MyScore/Badge").GetComponent<UISprite>();
this.scoreNum = this.centerAnchor.Find("MainPanel/MyScore/ScoreNum").GetComponent<UILabel>();
this.tripleKill = this.centerAnchor.Find("MainPanel/MyHonor/Grid/TripleKill/Count").GetComponent<UILabel>();
this.quataryKill = this.centerAnchor.Find("MainPanel/MyHonor/Grid/QuataryKill/Count").GetComponent<UILabel>();
this.pentaKill = this.centerAnchor.Find("MainPanel/MyHonor/Grid/PentaKill/Count").GetComponent<UILabel>();
this.legendary = this.centerAnchor.Find("MainPanel/MyHonor/Grid/Legendary/Count").GetComponent<UILabel>();
this.hero1 = this.centerAnchor.Find("MainPanel/Relaty/Grid/Hero1/Texture").GetComponent<UITexture>();
this.hero2 = this.centerAnchor.Find("MainPanel/Relaty/Grid/Hero2/Texture").GetComponent<UITexture>();
this.hero3 = this.centerAnchor.Find("MainPanel/Relaty/Grid/Hero3/Texture").GetComponent<UITexture>();
this.heroGrid = this.centerAnchor.Find("MainPanel/Relaty/Grid");
this.noHero = this.centerAnchor.Find("MainPanel/Relaty/Label");
this.vBtnL = this.centerAnchor.Find("MainPanel/RightMain/Bottom/VL");
this.vBtnR = this.centerAnchor.Find("MainPanel/RightMain/Bottom/VR");
this.btn5 = this.centerAnchor.Find("MainPanel/RightMain/Bottom/5");
this.btn10 = this.centerAnchor.Find("MainPanel/RightMain/Bottom/10");
this.btn15 = this.centerAnchor.Find("MainPanel/RightMain/Bottom/15");
this.btn20 = this.centerAnchor.Find("MainPanel/RightMain/Bottom/20");
this.bg1 = this.centerAnchor.Find("MainPanel/RightMain/Sprite");
this.nextPage = this.centerAnchor.Find("MainPanel/RightMain/Bottom/Page");
this.VBtnInMain = this.centerAnchor.Find("MainPanel/RightMain/Top/VBtn");
this.VBtnInHistory = this.centerAnchor.Find("HistoryPanel/Top/VBtn");
this.VBtnPanel = this.centerAnchor.Find("HistoryPanel/Top/VBtn/Panel");
this.xiba = this.centerAnchor.Find("HistoryPanel/Bottom");
this.noRecord = this.centerAnchor.Find("HistoryPanel/Label");
this.bg = this.centerAnchor.Find("HistoryPanel/RightHistory/Bg").GetComponent<UISprite>();
this.page = this.centerAnchor.Find("HistoryPanel/Bottom/Page").GetComponent<UILabel>();
this.pageNum = this.centerAnchor.Find("HistoryPanel/Bottom/PageNum").GetComponent<UILabel>();
this.btnVR = this.centerAnchor.Find("HistoryPanel/Bottom/VR");
this.btnVL = this.centerAnchor.Find("HistoryPanel/Bottom/VL");
this.title = this.centerAnchor.Find("HistoryPanel/RightHistory/Top/Title").GetComponent<UILabel>();
this.time = this.centerAnchor.Find("HistoryPanel/RightHistory/Top/Title/Time").GetComponent<UILabel>();
this.mainBattleRecordGrid = this.centerAnchor.Find("MainPanel/RightMain/Grid").GetComponent<UIGrid>();
this.historyAllBattleRecordGrid = this.centerAnchor.Find("HistoryPanel/Grid").GetComponent<UIGrid>();
this.historyBlueGrid = this.centerAnchor.Find("HistoryPanel/RightHistory/BlueGrid").GetComponent<UIGrid>();
this.historyRedGrid = this.centerAnchor.Find("HistoryPanel/RightHistory/RedGrid").GetComponent<UIGrid>();
this.historyGreenGrid = this.centerAnchor.Find("HistoryPanel/RightHistory/GreenGrid").GetComponent<UIGrid>();
this._battleRecordItem = Resources.Load<BattleRecord>("Prefab/UI/Achievement/BattleRecord");
this._playerBattleItem = Resources.Load<PlayerBattleItem>("Prefab/UI/Achievement/PlayerBattleItem");
this._playerBattleDetailsItem = Resources.Load<PlayerBattleDetailsItem>("Prefab/UI/Achievement/PlayerBattleDetailsItem");
this._myHeroItem = Resources.Load<MyHeroItem>("Prefab/UI/Achievement/MyHeroItem");
this._myHonorItem = Resources.Load<ScreenShotItem>("Prefab/UI/Achievement/ScreenShotItem");
this.detailBtn = this.centerAnchor.Find("HistoryPanel/RightHistory/Top/Sprite");
this.closeDetailBtn = this.centerAnchor.Find("HistoryPanel/AnalysisPanel/Bg");
this.AnalysisPanel = this.centerAnchor.Find("HistoryPanel/AnalysisPanel");
this.dtl_blueGrid = this.AnalysisPanel.Find("BlueGrid").GetComponent<UIGrid>();
this.dtl_redGrid = this.AnalysisPanel.Find("RedGrid").GetComponent<UIGrid>();
this.dtl_greenGrid = this.AnalysisPanel.Find("GreenGrid").GetComponent<UIGrid>();
this.dtl_date = this.AnalysisPanel.Find("Detalis/Date").GetComponent<UILabel>();
this.dtl_startTime = this.AnalysisPanel.Find("Detalis/StartTime").GetComponent<UILabel>();
this.dtl_timeLength = this.AnalysisPanel.Find("Detalis/Time").GetComponent<UILabel>();
this.dtl_type = this.AnalysisPanel.Find("Detalis/Type").GetComponent<UILabel>();
this.dtl_killCount = this.AnalysisPanel.Find("Detalis/KillCount").GetComponent<UILabel>();
this.dtl_money = this.AnalysisPanel.Find("Detalis/Money").GetComponent<UILabel>();
this.dtl_vectory = this.AnalysisPanel.Find("Detalis/Title").GetComponent<UISprite>();
this.bg0 = this.AnalysisPanel.Find("Bg0").GetComponent<UISprite>();
this.allBtn = this.centerAnchor.Find("HonorPanel/Grid/All");
this.pentaBtn = this.centerAnchor.Find("HonorPanel/Grid/Penta");
this.quataryBtn = this.centerAnchor.Find("HonorPanel/Grid/Quatary");
this.tripleBtn = this.centerAnchor.Find("HonorPanel/Grid/Triple");
this.legendaryBtn = this.centerAnchor.Find("HonorPanel/Grid/Legendary");
this.picGrid = this.centerAnchor.Find("HonorPanel/RightHonor/Scroll View/Grid").GetComponent<UIGrid>();
this.myHeros = this.centerAnchor.Find("MyHeroesPanel");
this.hero_all = this.myHeros.Find("Title/Hero/All").GetComponent<UILabel>();
this.hero_own = this.myHeros.Find("Title/Hero/Own").GetComponent<UILabel>();
this.skin_all = this.myHeros.Find("Title/Skin/All").GetComponent<UILabel>();
this.skin_own = this.myHeros.Find("Title/Skin/Own").GetComponent<UILabel>();
this.myHero_grid = this.myHeros.Find("Scroll View/Grid").GetComponent<UIGrid>();
this.mHeroPanel_ScrollView = this.myHeros.Find("Scroll View").GetComponent<UIScrollView>();
this.myHeros_noRecord = this.myHeros.Find("NoRecord");
this.topAssist = this.centerAnchor.Find("AbilityPanel/RightAbility/Help").GetComponent<UILabel>();
this.topBeDamage = this.centerAnchor.Find("AbilityPanel/RightAbility/DamageIn").GetComponent<UILabel>();
this.topDamage = this.centerAnchor.Find("AbilityPanel/RightAbility/DamageOut").GetComponent<UILabel>();
this.topKda = this.centerAnchor.Find("AbilityPanel/RightAbility/KDA").GetComponent<UILabel>();
this.topKeepKill = this.centerAnchor.Find("AbilityPanel/RightAbility/KillCombo").GetComponent<UILabel>();
this.topKill = this.centerAnchor.Find("AbilityPanel/RightAbility/Kill").GetComponent<UILabel>();
this.topKeepWin = this.centerAnchor.Find("AbilityPanel/RightAbility/Win").GetComponent<UILabel>();
this.topKillMonster = this.centerAnchor.Find("AbilityPanel/RightAbility/Hit").GetComponent<UILabel>();
this.topMoney = this.centerAnchor.Find("AbilityPanel/RightAbility/Economy").GetComponent<UILabel>();
this.totalMvp = this.centerAnchor.Find("AbilityPanel/RightAbility/MVPCount").GetComponent<UILabel>();
this.plane = this.centerAnchor.Find("AbilityPanel/Poly/Plane").GetComponent<Double_Mesh>();
this.line = this.centerAnchor.Find("AbilityPanel/Poly/Line").GetComponent<Mesh_Circle>();
this.shareBtn = this.leftAnchor.Find("Panel/Share");
UIEventListener expr_CA6 = UIEventListener.Get(this.mainBtn.gameObject);
expr_CA6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_CA6.onClick, new UIEventListener.VoidDelegate(this.OnClicMainBtn));
UIEventListener expr_CD7 = UIEventListener.Get(this.historyBtn.gameObject);
expr_CD7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_CD7.onClick, new UIEventListener.VoidDelegate(this.OnClicHistoryBtn));
UIEventListener expr_D08 = UIEventListener.Get(this.honorBtn.gameObject);
expr_D08.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_D08.onClick, new UIEventListener.VoidDelegate(this.OnClicHonorBtn));
UIEventListener expr_D39 = UIEventListener.Get(this.momentBtn.gameObject);
expr_D39.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_D39.onClick, new UIEventListener.VoidDelegate(this.OnClicMomentBtn));
UIEventListener expr_D6A = UIEventListener.Get(this.heroesBtn.gameObject);
expr_D6A.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_D6A.onClick, new UIEventListener.VoidDelegate(this.OnClicHeroBtn));
UIEventListener expr_D9B = UIEventListener.Get(this.abilityBtn.gameObject);
expr_D9B.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_D9B.onClick, new UIEventListener.VoidDelegate(this.OnClicAbilityBtn));
UIEventListener expr_DCC = UIEventListener.Get(this.detailBtn.gameObject);
expr_DCC.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_DCC.onClick, new UIEventListener.VoidDelegate(this.OnClickDetailBtn));
UIEventListener expr_DFD = UIEventListener.Get(this.closeDetailBtn.gameObject);
expr_DFD.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_DFD.onClick, new UIEventListener.VoidDelegate(this.OnClickDetailBtn));
UIEventListener expr_E2E = UIEventListener.Get(this.vBtnL.gameObject);
expr_E2E.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_E2E.onClick, new UIEventListener.VoidDelegate(this.OnClickChangePageBtnInMain));
UIEventListener expr_E5F = UIEventListener.Get(this.vBtnR.gameObject);
expr_E5F.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_E5F.onClick, new UIEventListener.VoidDelegate(this.OnClickChangePageBtnInMain));
UIEventListener expr_E90 = UIEventListener.Get(this.btn5.gameObject);
expr_E90.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_E90.onClick, new UIEventListener.VoidDelegate(this.OnClickNumBtn));
UIEventListener expr_EC1 = UIEventListener.Get(this.btn10.gameObject);
expr_EC1.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_EC1.onClick, new UIEventListener.VoidDelegate(this.OnClickNumBtn));
UIEventListener expr_EF2 = UIEventListener.Get(this.btn15.gameObject);
expr_EF2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_EF2.onClick, new UIEventListener.VoidDelegate(this.OnClickNumBtn));
UIEventListener expr_F23 = UIEventListener.Get(this.btn20.gameObject);
expr_F23.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_F23.onClick, new UIEventListener.VoidDelegate(this.OnClickNumBtn));
UIEventListener expr_F54 = UIEventListener.Get(this.btnVR.gameObject);
expr_F54.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_F54.onClick, new UIEventListener.VoidDelegate(this.OnClickChangePageBtn));
UIEventListener expr_F85 = UIEventListener.Get(this.btnVL.gameObject);
expr_F85.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_F85.onClick, new UIEventListener.VoidDelegate(this.OnClickChangePageBtn));
UIEventListener expr_FB6 = UIEventListener.Get(this.allBtn.gameObject);
expr_FB6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_FB6.onClick, new UIEventListener.VoidDelegate(this.OnClickAllBtn));
UIEventListener expr_FE7 = UIEventListener.Get(this.pentaBtn.gameObject);
expr_FE7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_FE7.onClick, new UIEventListener.VoidDelegate(this.OnClickAllBtn));
UIEventListener expr_1018 = UIEventListener.Get(this.quataryBtn.gameObject);
expr_1018.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_1018.onClick, new UIEventListener.VoidDelegate(this.OnClickAllBtn));
UIEventListener expr_1049 = UIEventListener.Get(this.tripleBtn.gameObject);
expr_1049.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_1049.onClick, new UIEventListener.VoidDelegate(this.OnClickAllBtn));
UIEventListener expr_107A = UIEventListener.Get(this.legendaryBtn.gameObject);
expr_107A.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_107A.onClick, new UIEventListener.VoidDelegate(this.OnClickAllBtn));
UIEventListener.Get(this.shareBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.OnClickShareBtn);
}
private void OnClickAllBtn(GameObject go)
{
string name = go.name;
switch (name)
{
case "All":
GridHelper.FillGrid<ScreenShotItem>(this.picGrid, this._myHonorItem, this.honorDataList.Count, delegate(int idx, ScreenShotItem comp)
{
comp.Init(this.honorDataList[idx]);
});
break;
case "Penta":
{
List<KdaUserHonorData> pentalist = new List<KdaUserHonorData>();
for (int i = 0; i < this.honorDataList.Count; i++)
{
if (this.honorDataList[i].killtype == KillType.PentaKill)
{
pentalist.Add(this.honorDataList[i]);
}
}
GridHelper.FillGrid<ScreenShotItem>(this.picGrid, this._myHonorItem, pentalist.Count, delegate(int idx, ScreenShotItem comp)
{
comp.Init(pentalist[idx]);
});
break;
}
case "Quatary":
{
List<KdaUserHonorData> quatarylist = new List<KdaUserHonorData>();
for (int j = 0; j < this.honorDataList.Count; j++)
{
if (this.honorDataList[j].killtype == KillType.QuadraKill)
{
quatarylist.Add(this.honorDataList[j]);
}
}
GridHelper.FillGrid<ScreenShotItem>(this.picGrid, this._myHonorItem, quatarylist.Count, delegate(int idx, ScreenShotItem comp)
{
comp.Init(quatarylist[idx]);
});
break;
}
case "Triple":
{
List<KdaUserHonorData> triplelist = new List<KdaUserHonorData>();
for (int k = 0; k < this.honorDataList.Count; k++)
{
if (this.honorDataList[k].killtype == KillType.TripleKill)
{
triplelist.Add(this.honorDataList[k]);
}
}
GridHelper.FillGrid<ScreenShotItem>(this.picGrid, this._myHonorItem, triplelist.Count, delegate(int idx, ScreenShotItem comp)
{
comp.Init(triplelist[idx]);
});
break;
}
case "Legendary":
{
List<KdaUserHonorData> legendarylist = new List<KdaUserHonorData>();
for (int l = 0; l < this.honorDataList.Count; l++)
{
if (this.honorDataList[l].killtype == KillType.GodLike)
{
legendarylist.Add(this.honorDataList[l]);
}
}
GridHelper.FillGrid<ScreenShotItem>(this.picGrid, this._myHonorItem, legendarylist.Count, delegate(int idx, ScreenShotItem comp)
{
comp.Init(legendarylist[idx]);
});
break;
}
}
}
private void OnClickChangePageBtnInMain(GameObject obj = null)
{
BattleRecord.TempObj = null;
this.oobj = null;
if (obj == this.vBtnR.gameObject)
{
if ((float)(this.vBtnInMain + 1) > Mathf.Ceil((float)this.AllCountInMain / 5f) || this.vBtnInMain + 1 > 4)
{
return;
}
this.vBtnInMain++;
}
else
{
if (this.vBtnInMain - 1 < 1)
{
return;
}
this.vBtnInMain--;
}
if (this.vBtnInMain == 1)
{
this.OnClickNumBtn(this.btn5.gameObject);
}
else if (this.vBtnInMain == 2)
{
this.OnClickNumBtn(this.btn10.gameObject);
}
else if (this.vBtnInMain == 3)
{
this.OnClickNumBtn(this.btn15.gameObject);
}
else if (this.vBtnInMain == 4)
{
this.OnClickNumBtn(this.btn20.gameObject);
}
}
private void OnClickChangePageBtn(GameObject obj = null)
{
BattleRecord.TempObj = null;
this.oobj = null;
if (obj == this.btnVR.gameObject)
{
if ((float)(this.vBtn + 1) > Mathf.Ceil((float)this.AllCount / 5f))
{
return;
}
this.vBtn++;
}
else
{
if (this.vBtn - 1 < 1)
{
return;
}
this.vBtn--;
}
this.ApplyHeroRecordInfo(this.battleID, this.vBtn);
}
private void OnClickNumBtn(GameObject obj)
{
if (this.temp == obj)
{
return;
}
if (this.temp != null)
{
this.temp.transform.GetComponent<UILabel>().color = new Color32(0, 115, 156, 255);
}
obj.transform.GetComponent<UILabel>().color = new Color32(0, 243, 252, 255);
string name = obj.name;
switch (name)
{
case "5":
this.vBtnInMain = 1;
break;
case "10":
this.vBtnInMain = 2;
break;
case "15":
this.vBtnInMain = 3;
break;
case "20":
this.vBtnInMain = 4;
break;
}
this.temp = obj;
this.ApplyHeroRecordInfo(this.battleID, this.vBtnInMain);
}
private void OnClicMainBtn(GameObject obj = null)
{
this.isInMainPanel = true;
BattleTypeList component = this.VBtnInMain.GetComponent<BattleTypeList>();
if (!this.haveClickMain)
{
this.vBtnInMain = 1;
component.chooseStr = LanguageManager.Instance.GetStringById("Combatgains_Describe_Twenty");
this.OnClickNumBtn(this.btn5.gameObject);
}
this.OpenMainPanel();
}
public void OnClicHistoryBtn(GameObject obj = null)
{
this.isInMainPanel = false;
BattleTypeList component = Singleton<AchievementView>.Instance.VBtnInHistory.GetComponent<BattleTypeList>();
if (!this.haveClickHistory)
{
this.vBtn = 1;
component.chooseStr = LanguageManager.Instance.GetStringById("Combatgains_Describe_All");
SendMsgManager.SendMsgParam param = new SendMsgManager.SendMsgParam(true, "正在获得数据", true, 15f);
SendMsgManager.Instance.SendMsg(MobaGameCode.GetHeroRecordInfo, param, new object[]
{
string.Empty,
1
});
this.OpenHistoryPanel(true);
}
else
{
this.OpenHistoryPanelnew();
}
}
private void OnClicHonorBtn(GameObject obj = null)
{
Singleton<TipView>.Instance.ShowViewSetText("暂未开放", 1f);
}
private void OnClicMomentBtn(GameObject obj = null)
{
Singleton<TipView>.Instance.ShowViewSetText("暂未开放", 1f);
}
private void OnClicHeroBtn(GameObject obj = null)
{
this.OpenMyHeroesPanel();
}
private void OnClicAbilityBtn(GameObject obj = null)
{
this.OpenAbilityPanel();
}
private void OnClickShareBtn(GameObject go)
{
GameManager.Instance.DoShareSDK(3, new Rect((float)Screen.width * 0.215f, (float)Screen.height * 0.02f, 1488f * (float)Screen.width / 1920f, 920f * (float)Screen.width / 1920f), null);
}
public override void RegisterUpdateHandler()
{
this.mainBtn.transform.GetComponent<UIToggle>().value = true;
Singleton<MenuTopBarView>.Instance.DoOpenOtherViewAction(0.25f);
MVC_MessageManager.AddListener_view(MobaGameCode.GetTotalRecord, new MobaMessageFunc(this.OnGetMsg_AchieveInfo));
MVC_MessageManager.AddListener_view(MobaGameCode.GetHeroRecordInfo, new MobaMessageFunc(this.OnGetMsg_PrePageBattleInfo));
MVC_MessageManager.AddListener_view(MobaGameCode.GetHistoryRecord, new MobaMessageFunc(this.OnGetMsg_HistoryInfo));
MVC_MessageManager.AddListener_view(MobaGameCode.GetKdaMyHeroData, new MobaMessageFunc(this.OnGetMsg_MyHeroInfo));
MVC_MessageManager.AddListener_view(MobaGameCode.GetMyFightAbility, new MobaMessageFunc(this.OnGetMsg_MyAbilityInfo));
MVC_MessageManager.AddListener_view(MobaGameCode.GetUserHonorPic, new MobaMessageFunc(this.OnGetMsg_MyHonorInfo));
SendMsgManager.Instance.SendMsg(MobaGameCode.GetTotalRecord, null, new object[0]);
this.RefreshUI();
SendMsgManager.Instance.SendMsg(MobaGameCode.GetMyFightAbility, null, new object[0]);
}
public override void CancelUpdateHandler()
{
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetTotalRecord, new MobaMessageFunc(this.OnGetMsg_AchieveInfo));
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetHeroRecordInfo, new MobaMessageFunc(this.OnGetMsg_PrePageBattleInfo));
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetHistoryRecord, new MobaMessageFunc(this.OnGetMsg_HistoryInfo));
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetKdaMyHeroData, new MobaMessageFunc(this.OnGetMsg_MyHeroInfo));
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetMyFightAbility, new MobaMessageFunc(this.OnGetMsg_MyAbilityInfo));
MVC_MessageManager.RemoveListener_view(MobaGameCode.GetUserHonorPic, new MobaMessageFunc(this.OnGetMsg_MyHonorInfo));
this.PageNum = 1;
this.PageNumInMain = 1;
this.AnalysisPanel.gameObject.SetActive(false);
this.historyBlueGrid.GetComponent<UIWidget>().alpha = 0.01f;
this.historyRedGrid.GetComponent<UIWidget>().alpha = 0.01f;
this.historyGreenGrid.GetComponent<UIWidget>().alpha = 0.01f;
if (null != Singleton<MenuTopBarView>.Instance.gameObject)
{
Singleton<MenuTopBarView>.Instance.SetPanelVisible(true);
}
this.haveClickHistory = false;
this.haveClickMain = false;
BattleTypeList component = this.VBtnInMain.GetComponent<BattleTypeList>();
BattleTypeList component2 = this.VBtnInHistory.GetComponent<BattleTypeList>();
component.RefreshLabelToggle();
component2.RefreshLabelToggle();
for (int i = 0; i < 6; i++)
{
this.line.value_in[i] = 0f;
this.plane.value[i] = 0f;
}
this.coroutineManager.StopAllCoroutine();
}
public void ApplyHeroRecordInfo(string battleid, int pagenumber)
{
if (this.isInMainPanel)
{
this.chooseBattleName = battleid;
this.PageNumInMain = pagenumber;
}
this.battleID = battleid;
this.PageNum = pagenumber;
SendMsgManager.SendMsgParam param = new SendMsgManager.SendMsgParam(true, "正在获得数据", true, 15f);
SendMsgManager.Instance.SendMsg(MobaGameCode.GetHeroRecordInfo, param, new object[]
{
battleid,
pagenumber
});
}
public override void RefreshUI()
{
this.OnClicMainBtn(null);
this.btn5.transform.GetComponent<UILabel>().color = new Color32(0, 243, 252, 255);
this.temp = this.btn5.gameObject;
}
private void OnGetMsg_AchieveInfo(MobaMessage msg)
{
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok || mobaErrorCode == MobaErrorCode.ItemExist)
{
this.recordData = ModelManager.Instance.Get_GetMyAchievementData_X().kdaData;
this.battleCount = this.recordData.wincount + this.recordData.losecount;
this.UpdateMainAchieve();
}
}
private void OnGetMsg_PrePageBattleInfo(MobaMessage msg)
{
this.haveClickMain = true;
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok)
{
int num2 = Convert.ToInt32(operationResponse.Parameters[101]);
int num3 = Convert.ToInt32(operationResponse.Parameters[10]);
this.heroRecordDic = ModelManager.Instance.Get_GetMyAchievementData_X().myHeroRecord;
this.AllCount = num2;
this.PageNum = num3;
if (this.isInMainPanel)
{
this.heroRecordListInMain = this.heroRecordDic;
this.AllCountInMain = num2;
this.PageNumInMain = num3;
}
if (this.heroRecordDic == null)
{
return;
}
this.CreatBattleRecordNew(this.isInMainPanel, num2, num3, this.heroRecordDic);
if (!this.isInMainPanel)
{
if (this.heroRecordDic.Count > 0)
{
this.SendMsgToGetHistoryRec(this.heroRecordDic.ElementAt(0).Key);
}
else
{
this.ShowOrHideRecordLst(false, true);
}
}
}
}
private void OnGetMsg_HistoryInfo(MobaMessage msg)
{
this.haveClickHistory = true;
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok)
{
this.NewNewUpdateHistoryRecord(ModelManager.Instance.Get_GetMyAchievementData_X().historyBattle);
}
}
private void OnGetMsg_MyHeroInfo(MobaMessage msg)
{
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok || mobaErrorCode == MobaErrorCode.ItemExist)
{
this.OpenMyHeroesPanel();
}
}
private void OnGetMsg_MyAbilityInfo(MobaMessage msg)
{
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok || mobaErrorCode == MobaErrorCode.ItemExist)
{
this.abilityGraph = ModelManager.Instance.Get_GetMyAchievementData_X().abilityGraph;
}
}
private void OnGetMsg_MyHonorInfo(MobaMessage msg)
{
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode == MobaErrorCode.Ok)
{
this.honorDataList = ModelManager.Instance.Get_GetMyAchievementData_X().myHonorData;
this.OpenHonorPanel();
}
}
private void OnGetMsg_MyHonorInfo1(MobaMessage msg)
{
if (msg == null)
{
return;
}
OperationResponse operationResponse = msg.Param as OperationResponse;
if (operationResponse == null)
{
return;
}
int num = (int)operationResponse.Parameters[1];
MobaErrorCode mobaErrorCode = (MobaErrorCode)num;
if (mobaErrorCode != MobaErrorCode.Ok)
{
}
}
private void OpenMainPanel()
{
this.mainPanel.gameObject.SetActive(true);
this.historyPanel.gameObject.SetActive(false);
this.honorPanel.gameObject.SetActive(false);
this.momentPanel.gameObject.SetActive(false);