using UnityEngine;
|
|
namespace vnxbqy.UI
|
{
|
public class FairySiegeItemCellArr : MonoBehaviour
|
{
|
[SerializeField] ItemCell[] itemCells;
|
|
public void Display(int[][] arr)
|
{
|
if (!arr.IsNullOrEmpty())
|
{
|
for (var i = 0; i < itemCells.Length; i++)
|
{
|
if (i < arr.Length)
|
{
|
int itemId = arr[i][0];
|
itemCells[i].SetActive(true);
|
itemCells[i].Init(new ItemCellModel(itemId, false, (ulong)arr[i][1]));
|
itemCells[i].button.SetListener(() => { ItemTipUtility.Show(itemId); });
|
}
|
else
|
{
|
itemCells[i].SetActive(false);
|
}
|
}
|
}
|
}
|
}
|
}
|