using System.Collections.Generic;
|
using UnityEngine;
|
|
namespace vnxbqy.UI
|
{
|
public class FairySiegeJoinListPlayerCell : CellView
|
{
|
[SerializeField] List<TextEx> fairyNameList = new List<TextEx>();
|
FairySiegeActModel model { get { return ModelCenter.Instance.GetModel<FairySiegeActModel>(); } }
|
|
public void Display(int rowIndex)
|
{
|
if (!model.TryGetSortMemberList(out List<FairySiegeCampMember> list))
|
return;
|
for (int i = 0; i < fairyNameList.Count; i++)
|
{
|
int index = rowIndex * model.joinListPlayerRowMax + i;
|
if (index < list.Count)
|
{
|
fairyNameList[i].text = list[index].Name;
|
fairyNameList[i].SetActive(true);
|
}
|
else
|
{
|
fairyNameList[i].SetActive(false);
|
}
|
}
|
}
|
}
|
}
|