27 lines
594 B
C#
27 lines
594 B
C#
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
public class ResultxInfoCard : MonoBehaviour
|
||
|
|
{
|
||
|
|
public Image i_bg;
|
||
|
|
public TextMeshProUGUI t_title_on, t_title_off, t_x;
|
||
|
|
public Sprite sprite_on, sprite_off;
|
||
|
|
|
||
|
|
public void Set(string title, int x)
|
||
|
|
{
|
||
|
|
if (x > 1)
|
||
|
|
{
|
||
|
|
i_bg.sprite = sprite_on;
|
||
|
|
t_title_off.text = "";
|
||
|
|
t_title_on.text = title;
|
||
|
|
t_x.text = $"x{x}";
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
i_bg.sprite = sprite_off;
|
||
|
|
t_title_off.text = title;
|
||
|
|
t_x.text = "";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|