少年修仙传客户端代码仓库
hch
2025-07-02 600733c8f592cb9e65f2b7a3e110ac1d686e6bfe
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
35
36
37
38
39
40
using vnxbqy.UI;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
 
public class EquipShenDecomMaterialCell : ILBehaviour
{
    List<ItemCell> itemCells = new List<ItemCell>();
 
 
    protected override void Awake() 
    {
        itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell1"));
        itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell2"));
        itemCells.Add(proxy.GetWidgtEx<ItemCell>("itemcell3"));
    }
 
    public void Display(int startIndex)
    {
        var keys = EquipEvolveModel.Instance.shenDecomMaterials.Keys.ToList();
        keys.Sort();
        for (int i = 0; i < 3; i++)
        {
            var index = startIndex + i;
            if (index < EquipEvolveModel.Instance.shenDecomMaterials.Count)
            {
                itemCells[i].SetActiveIL(true);
                var model = new ItemCellModel(keys[index], false, (ulong)EquipEvolveModel.Instance.shenDecomMaterials[keys[index]]);
                itemCells[i].Init(model);
                itemCells[i].button.SetListener(()=> {
                    ItemTipUtility.Show(keys[index]);
                });
                continue;
            }
 
            itemCells[i].SetActiveIL(false);
        }
    }
}