RandomGFGoStop/Assets/Scripts/UI/ResultxInfoCard.cs

27 lines
594 B
C#
Raw Normal View History

2025-08-30 03:09:13 +00:00
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 = "";
}
}
}