CapersProject/Assets/02.Scripts/Ui/Tycoon/TycoonResultCard.cs

38 lines
752 B
C#
Raw Normal View History

2024-11-07 12:02:00 +00:00
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class TycoonResultCard : MonoBehaviour
{
[field: SerializeField]
private TextMeshProUGUI text;
[field: SerializeField]
private Image image;
[field: SerializeField]
private TextMeshProUGUI count;
public void SetText(string str)
{
text.text = str;
2024-11-11 11:11:10 +00:00
//우선 임시로... 색을 0으로...
var color = text.color;
color.a = 0.0f;
text.color = color;
2024-11-07 12:02:00 +00:00
}
public void SetImage(Sprite spr)
{
image.sprite = spr;
}
2024-11-30 11:53:38 +00:00
public void SetCount(int value)
2024-11-07 12:02:00 +00:00
{
2024-11-30 11:53:38 +00:00
count.text = $"x{value}";
2024-11-07 12:02:00 +00:00
}
//해당 버튼을 클릭했을때 커지는 효과 넣어주기...
}