using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class B08_TaskPointItem : MonoBehaviour { public int itemIndex; public Text posAndtimeText; public Text messageText; public Button imgButton; private GCYWLayer gcywLayer; private void Awake() { imgButton.onClick.AddListener(() => { gcywLayer.OpenTaskImgPanel(); }); } public void SetData(GCYWLayer baseLayer,B08_TaskItems data,int index,string time) { gcywLayer = baseLayer; itemIndex = index; posAndtimeText.text = $"{(index==0?"起点":"")} {time}"; messageText.text = $"{data.item_name}"; } }