using System.Collections.Generic;
|
using UnityEngine;
|
|
public class HeroDebutCallRateHeroCell : CellView
|
{
|
|
[SerializeField] ItemCell[] itemCells;
|
public void Display(int rowIndex, List<Item> dataList)
|
{
|
if (dataList == null) return;
|
|
for (int i = 0; i < itemCells.Length; i++)
|
{
|
int dataIndex = rowIndex * HeroDebutCallRateHeroWin.rowCountMax + i;
|
|
if (dataIndex < dataList.Count)
|
{
|
itemCells[i].SetActive(true);
|
itemCells[i].Init(new ItemCellModel(dataList[dataIndex].id, true, dataList[dataIndex].countEx));
|
itemCells[i].button.SetListener(() => ItemTipUtility.Show(dataList[dataIndex].id));
|
}
|
else
|
{
|
itemCells[i].SetActive(false);
|
}
|
}
|
}
|
}
|