using System.Collections.Generic; using UnityEngine; namespace vnxbqy.UI { public class FairySiegeSpringAwardNormalCell : CellView { [SerializeField] List itemCells; [SerializeField] TextEx txtAwardName; public void Display(int layerNum) { var config = ActFamilyGCZSQConfig.Get(layerNum); var arr = config.LayerAwardItemList; txtAwardName.text = Language.Get("FairySiege028", layerNum); for (var i = 0; i < itemCells.Count; i++) { if (i < arr.Length) { itemCells[i].SetActive(true); var itemId = arr[i][0]; var count = arr[i][1]; itemCells[i].Init(new ItemCellModel(itemId, false, (ulong)count)); itemCells[i].button.SetListener(() => ItemTipUtility.Show(itemId)); } else { itemCells[i].SetActive(false); } } } } }