using System.Collections.Generic;
|
using UnityEngine;
|
|
public class HeroGiftLineCell : CellView
|
{
|
[SerializeField] GiftBaseCell[] cardList;
|
|
public void Display(int index, List<int> configList)
|
{
|
for (int i = 0; i < cardList.Length; i++)
|
{
|
if (index < configList.Count)
|
{
|
var giftID = configList[index];
|
var giftLV = HeroUIManager.Instance.maxGiftLevel;
|
cardList[i].SetActive(true);
|
cardList[i].Init(giftID, giftLV, () =>
|
{
|
var giftConfig = HeroTalentConfig.Get(giftID);
|
SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
|
Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
|
SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
|
UIManager.Instance.OpenWindow<SmallTipWin>();
|
});
|
}
|
else
|
{
|
cardList[i].SetActive(false);
|
}
|
}
|
}
|
}
|