lcy
2026-04-30 2e7d66b9b7d541d878b2220fa1e50552e7553708
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HeroSkinRoleCell : MonoBehaviour
{
    [SerializeField] UIHeroController heroModel;
    [SerializeField] Image selectImg;
    [SerializeField] Button selectBtn;
 
    //index为皮肤表中索引
    public void Display(HeroConfig heroConfig, int index)
    {
        selectImg.SetActive(HeroSkinChooseWin.selectIndex == index);
        heroModel.Create(heroConfig.SkinIDList[index], heroConfig.UIScale);
        selectBtn.AddListener(() =>
        {
            var ui = UIManager.Instance.GetUI<HeroSkinChooseWin>();
            ui.SetSelectIndex(index);
 
        });
    }
}