using System.Collections.Generic; using UnityEngine; namespace vnxbqy.UI { public class FairySiegeJoinListFairyCell : CellView { [SerializeField] List fairyNameList = new List(); FairySiegeActModel model { get { return ModelCenter.Instance.GetModel(); } } 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 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); } } } } }