hch
9 天以前 f7cf7973de65296e193e0dae18c86a5fcec8fdf3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
            }
        }
    }
}