2025-01-29 23:46:26 +00:00
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2025-01-31 04:40:59 +00:00
|
|
|
public class RankingRewardCard : CardBase
|
2025-01-29 23:46:26 +00:00
|
|
|
{
|
2025-07-12 00:13:56 +00:00
|
|
|
public Image[] images; // 0 bg, 1 랭킹, 2 보상
|
|
|
|
|
public TextMeshProUGUI[] texts; // 0 순위, 1 보상
|
2025-01-29 23:46:26 +00:00
|
|
|
|
|
|
|
|
public override void Set<T>(T _base)
|
|
|
|
|
{
|
|
|
|
|
base.Set(_base);
|
|
|
|
|
var data = _base as RankRewardListTableData;
|
|
|
|
|
|
2025-07-12 00:13:56 +00:00
|
|
|
images[1].enabled = data.n_MaxRank <= 3;
|
|
|
|
|
if (images[1].enabled)
|
2025-01-29 23:46:26 +00:00
|
|
|
{
|
2025-07-12 00:13:56 +00:00
|
|
|
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite("slot 2");
|
|
|
|
|
images[1].sprite = UIAtlasMgr.Ins.Get_Sprite(DSUtil.Format("rank{0}", data.n_MaxRank));
|
|
|
|
|
texts[0].text = "";
|
2025-01-29 23:46:26 +00:00
|
|
|
}
|
|
|
|
|
else
|
2025-07-12 00:13:56 +00:00
|
|
|
{
|
|
|
|
|
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite("slot 1");
|
|
|
|
|
texts[0].text = DSUtil.Format(332, data.n_MinRank, data.n_MaxRank);
|
|
|
|
|
}
|
2025-01-29 23:46:26 +00:00
|
|
|
|
2025-07-12 00:13:56 +00:00
|
|
|
images[2].sprite = UIAtlasMgr.Ins.Get_Sprite(data.n_RewardID);
|
|
|
|
|
texts[1].text = DSUtil.Format("x{0}", data.n_RewardAmount);
|
2025-01-29 23:46:26 +00:00
|
|
|
}
|
|
|
|
|
}
|