mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
23 lines
508 B
C#
23 lines
508 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class MonoRewardItem : MonoBehaviour
|
|
{
|
|
private RewardUIData _rewardData;
|
|
|
|
public void SetupView(RewardUIData rewardData)
|
|
{
|
|
_rewardData = rewardData;
|
|
if (rewardData == null)
|
|
{
|
|
base.gameObject.SetActive(false);
|
|
return;
|
|
}
|
|
base.transform.Find("Number").GetComponent<Text>().text = _rewardData.value.ToString();
|
|
base.transform.Find("Icon").GetComponent<Image>().sprite = _rewardData.GetIconSprite();
|
|
}
|
|
}
|
|
}
|