少年修仙传客户端代码仓库
lcy
2025-05-08 1314c3b3c14cd520bbb8569b5f98d68933a22cd3
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
34
using System.Collections.Generic;
using UnityEngine;
 
namespace vnxbqy.UI
{
    public class FairySiegeSpringAwardNormalCell : CellView
    {
        [SerializeField] List<ItemCell> itemCells;
        [SerializeField] TextEx txtAwardName;
 
        public void Display(int layerNum)
        {
            var config = ActFamilyGCZSQConfig.Get(layerNum);
            var arr = config.LayerAwardItemList;
            txtAwardName.text = Language.Get("FairySiege028", layerNum);
 
            for (var i = 0; i < itemCells.Count; i++)
            {
                if (i < arr.Length)
                {
                    itemCells[i].SetActive(true);
                    var itemId = arr[i][0];
                    var count = arr[i][1];
                    itemCells[i].Init(new ItemCellModel(itemId, false, (ulong)count));
                    itemCells[i].button.SetListener(() => ItemTipUtility.Show(count));
                }
                else
                {
                    itemCells[i].SetActive(false);
                }
            }
        }
    }
}