RandomGFGoStop/Assets/Scripts/UI/ResultxInfoCard.cs

30 lines
746 B
C#
Raw Normal View History

2025-08-30 03:09:13 +00:00
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class ResultxInfoCard : CardBase
2025-08-30 03:09:13 +00:00
{
public Image i_bg;
public TextMeshProUGUI t_title_on, t_title_off, t_x;
public Sprite sprite_on, sprite_off;
public override void Set<T>(T _base, int iLoop = -1, int idata = -1)
2025-08-30 03:09:13 +00:00
{
base.Set(_base, iLoop, idata);
var data = _base as ResultxInfoData;
if (data.mul > 1)
2025-08-30 03:09:13 +00:00
{
i_bg.sprite = sprite_on;
t_title_off.text = "";
t_title_on.text = data.name;
t_x.text = $"x{data.mul}";
2025-08-30 03:09:13 +00:00
}
else
{
i_bg.sprite = sprite_off;
t_title_off.text = data.name;
t_title_on.text = t_x.text = "";
2025-08-30 03:09:13 +00:00
}
}
}