yyl
4 小时以前 f59b136d28cbfc0b9de9bced637845ce35345d95
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
using System.Collections.Generic;
using UnityEngine;
 
public class HeroFatesFastPutPreviewCell : MonoBehaviour
{
    [SerializeField] List<HeroFatesUpgradeHeadCell> headCells;
    HeroFatesManager manager { get { return HeroFatesManager.Instance; } }
 
    public void Display(int rowIndex, List<HeroInfo> list)
    {
        if (list.IsNullOrEmpty())
        {
            return;
        }
 
        for (int i = 0; i < headCells.Count; i++)
        {
            int index = rowIndex * manager.rowCountMax + i;
            if (index < list.Count)
            {
                headCells[i].SetActive(true);
                headCells[i].Display(list[index]);
            }
            else
            {
                headCells[i].SetActive(false);
            }
        }
    }
 
}