using UnityEngine; using UnityEngine.UI; using EnhancedUI.EnhancedScroller; using System.Collections.Generic; namespace vnxbqy.UI { public class EquipTypeLineCell : MonoBehaviour { [SerializeField] List typeCells = new List(); public void Refresh(CellView cell, List thirdTypeDatas) { if (thirdTypeDatas == null) return; int length = typeCells.Count; for (int i = 0; i < length; i++) { var typeCell = typeCells[i]; int index = length * cell.index + i; if(index < thirdTypeDatas.Count) { var thirdTypeData = thirdTypeDatas[index]; typeCell.SetActive(true); typeCell.SetDisplay(index,thirdTypeData.itemCompound); } else { typeCell.SetActive(false); } } } } }