少年修仙传客户端代码仓库
lcy
2025-05-08 1314c3b3c14cd520bbb8569b5f98d68933a22cd3
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
using System.Linq;
using UnityEngine;
 
namespace vnxbqy.UI
{
    public class FairySiegeScheduleGroupCell : CellView
    {
        [SerializeField] EmblemCell emblem;
        [SerializeField] ImageEx imgArrow;
        [SerializeField] TextEx txtFairyName;
        [SerializeField] TextEx txtLevel;
        [SerializeField] TextEx txtPlayerName;
        [SerializeField] TextEx txtRound;
        [SerializeField] ButtonEx btnInfo;
        [SerializeField] ButtonEx btnList;
        FairySiegeActModel model { get { return ModelCenter.Instance.GetModel<FairySiegeActModel>(); } }
        RankModel rankModel { get { return ModelCenter.Instance.GetModel<RankModel>(); } }
 
        public void Display(int index, CellView cell)
        {
            int battleType = cell.info.Value.infoInt1;
            var rankInfo = rankModel.GetRankPageDatas(FairySiegeActModel.crossRoundRankType);
            if (rankInfo.IsNullOrEmpty())
                return;
            var list = rankInfo.Keys.ToList();
            if (index < 0 || index >= rankInfo.Count)
                return;
            var info = rankInfo[list[index]];
 
            emblem.InitUI(EmblemHelper.GetOtherEmblemModel((int)info.value3));
            txtFairyName.text = info.name1;
            txtPlayerName.text = info.name2;
            txtLevel.text = UIHelper.ReplaceLargeNum(info.cmpValue * model.oneHundredMillion + info.cmpValue2);
            txtRound.text = (index + 1).ToString();
 
            bool isShowTip = model.TryGetMatchUpNum(model.operationCrossAct.JoinFamilyCnt, model.matchRound, battleType, out int num);
            if (num <= 0 || !isShowTip)
            {
                imgArrow.SetActive(false);
            }
            else
            {
                imgArrow.SetActive(index < num);
            }
            btnInfo.SetListener(() =>
            {
                model.queryFairyId = info.id;
                WindowCenter.Instance.Open<FairySiegeScheduleFairyInfoWin>();
            });
 
            btnList.SetListener(() =>
            {
                model.queryFairyId = info.id;
                WindowCenter.Instance.Open<FairySiegeScheduleNameListWin>();
            });
        }
    }
}