using UnityEngine;
|
|
public class HeroDebutShopLineCell : CellView
|
{
|
[SerializeField] HeroDebutShopCell[] storeCells;
|
HeroDebutManager manager => HeroDebutManager.Instance;
|
public void Display(int index)
|
{
|
var act = manager.GetOperationHeroAppearInfo();
|
if (act == null) return;
|
|
var config = ActHeroAppearConfig.Get(act.CfgID);
|
if (config == null) return;
|
|
if (!StoreModel.Instance.storeTypeDict.TryGetValue(config.ExShopType, out var list)) return;
|
|
for (int i = 0; i < storeCells.Length; i++)
|
{
|
if (index + i < list.Count)
|
{
|
storeCells[i].SetActive(true);
|
storeCells[i].Display(index + i);
|
}
|
else
|
{
|
storeCells[i].SetActive(false);
|
}
|
}
|
}
|
}
|