using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class StoreLineCell : CellView { [SerializeField] StoreCell[] storeCells; public void Display(int index) { if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType)) { return; } var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType]; for (int i = 0; i < storeCells.Length; i++) { if (index + i < list.Count) { storeCells[i].SetActive(true); storeCells[i].Display(index + i); } else { storeCells[i].SetActive(false); } } } }