using vnxbqy.UI; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; public class EquipShenDecomMaterialCell : ILBehaviour { List itemCells = new List(); protected override void Awake() { itemCells.Add(proxy.GetWidgtEx("itemcell1")); itemCells.Add(proxy.GetWidgtEx("itemcell2")); itemCells.Add(proxy.GetWidgtEx("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); } } }