hch
2025-09-10 a80d9e64b60403c71ff7ff32c9e94e6833f50ace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
public class CommonGetItemCell : CellView
{
    [SerializeField] List<CommonGetItem> commonGetItems = new List<CommonGetItem>();
    public void Display(int index, List<Item> showItems)
    {
        for (int i = 0; i < commonGetItems.Count; i++)
        {
            if (index + i < showItems.Count)
            {
                int itemId = showItems[index + i].id;
                commonGetItems[i].Display(itemId);
                commonGetItems[i].SetActive(true);
            }
            else
            {
                commonGetItems[i].SetActive(false);
            }
        }
    }
}