30 lines
746 B
C#
30 lines
746 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ResultxInfoCard : CardBase
|
|
{
|
|
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)
|
|
{
|
|
base.Set(_base, iLoop, idata);
|
|
var data = _base as ResultxInfoData;
|
|
|
|
if (data.mul > 1)
|
|
{
|
|
i_bg.sprite = sprite_on;
|
|
t_title_off.text = "";
|
|
t_title_on.text = data.name;
|
|
t_x.text = $"x{data.mul}";
|
|
}
|
|
else
|
|
{
|
|
i_bg.sprite = sprite_off;
|
|
t_title_off.text = data.name;
|
|
t_title_on.text = t_x.text = "";
|
|
}
|
|
}
|
|
} |