using System.Collections.Generic;
|
using UnityEngine;
|
|
namespace vnxbqy.UI
|
{
|
public class FairyEmblemCell : CellView
|
{
|
[SerializeField] List<FairyEmblemItem> fairyEmblemItemList = new List<FairyEmblemItem>();
|
FairyEmblemModel model { get { return ModelCenter.Instance.GetModel<FairyEmblemModel>(); } }
|
|
public void Display(int rowIndex)
|
{
|
List<int> showList = model.GetShowList();
|
for (int i = 0; i < fairyEmblemItemList.Count; i++)
|
{
|
//Ë÷Òý = ÐÐÊý * Ò»ÐÐչʾx¸ö»ÕÕ + i < »ÕÕÂ×ÜÊý
|
int index = rowIndex * model.MaxItemRowCount + i;
|
if (index < showList.Count)
|
{
|
int emblemId = showList[index];
|
fairyEmblemItemList[i].SetActive(true);
|
fairyEmblemItemList[i].Display(emblemId);
|
}
|
else
|
{
|
fairyEmblemItemList[i].SetActive(false);
|
}
|
}
|
}
|
}
|
}
|