50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
//
|
|
|
|
using cfg;
|
|
using EventCubeMelt;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace EventBlocks.UI
|
|
{
|
|
public class EventBlockShowItem : MonoBehaviour
|
|
{
|
|
private Transform _bottom;
|
|
|
|
private TMP_Text textDes;
|
|
|
|
private Image imgProp;
|
|
|
|
private void Awake()
|
|
{
|
|
_bottom = transform.Find("bottom");
|
|
textDes = transform.Find("Txt_des").GetComponent<TMP_Text>();
|
|
imgProp = transform.Find("img_prop").GetComponent<Image>();
|
|
}
|
|
private void Start()
|
|
{
|
|
|
|
}
|
|
private void OnDestroy()
|
|
{
|
|
|
|
}
|
|
|
|
//- 设置Item
|
|
public void SetItemData(EventCubeMeltCollection itemData,IUIService uiService)
|
|
{
|
|
uiService.SetImageSprite(imgProp,itemData.CollectingIcon);
|
|
}
|
|
#region LOG
|
|
private static void ELog(string message)
|
|
{
|
|
#if UNITY_EDITOR
|
|
if (!EventCubeMeltLogPolicy.EnableELog) return;
|
|
Debug.Log($"<color=orange>{nameof(EventBlockShowItem)} => {message}</color>");
|
|
#endif
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
} |