少年修仙传客户端代码仓库
hch
2025-07-24 50e53441950268933694eeb5aad36147bbe1014d
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
using System.Collections.Generic;
using UnityEngine;
 
namespace vnxbqy.UI
{
    public class FairySiegeJoinListFairyCell : CellView
    {
        [SerializeField] List<TextEx> fairyNameList = new List<TextEx>();
 
        FairySiegeActModel model { get { return ModelCenter.Instance.GetModel<FairySiegeActModel>(); } }
 
        public void Display(int rowIndex, CellView cellView)
        {
            if (model.operationCrossAct == null)
                return;
            if (model.operationCrossAct.joinFamilys.IsNullOrEmpty())
                return;
            uint serverId = (uint)cellView.info.Value.infoInt1;
            if (!model.TryGetSortFamilyList(serverId, out List<FairySiegeFamilyInfo> list))
                return;
 
            for (int i = 0; i < fairyNameList.Count; i++)
            {
                int index = rowIndex * model.joinListFairyRowMax + i;
                if (index < list.Count)
                {
                    fairyNameList[i].text = list[index].Name;
                    fairyNameList[i].SetActive(true);
                }
                else
                {
                    fairyNameList[i].SetActive(false);
                }
            }
        }
    }
}