using UnityEngine.UI;
|
using EnhancedUI.EnhancedScroller;
|
using TMPro;
|
public class FinalPanelItem : EnhancedScrollerCellView
|
{
|
public Text playerNameTxt;
|
public TextMeshProUGUI playerScoreTxt;
|
public TextMeshProUGUI indexTxt;
|
|
public Image icon;
|
public Image backGround;
|
|
public void SetData(FinalPanelItemData data)
|
{
|
playerNameTxt.text = data.playerName;
|
playerScoreTxt.text = data.score.ToString();
|
if (data.spriteIcon != null)
|
{
|
if (!icon.gameObject.activeSelf) icon.gameObject.SetActive(true);
|
icon.sprite = data.spriteIcon;
|
indexTxt.text = "";
|
}
|
else
|
{
|
icon.gameObject.SetActive(false);
|
indexTxt.text = data.index.ToString();
|
}
|
backGround.sprite = data.spriteBackGround;
|
|
}
|
}
|