|
@@ -88,6 +88,8 @@ public class GCYWLayer : YZTRootLayer
|
|
|
public List<TaskPointIcon> taskPointIcons = new List<TaskPointIcon>();
|
|
|
public LineRenderer taskPointLineRenderer;
|
|
|
|
|
|
+ public Button closePanelBtn;
|
|
|
+
|
|
|
private void Awake()
|
|
|
{
|
|
|
Init();
|
|
@@ -158,6 +160,18 @@ public class GCYWLayer : YZTRootLayer
|
|
|
TaoKouDataButton = this.transform.Find("TaoKouButton").GetComponent<Button>();
|
|
|
button_CG2 = TaoKouDataButton.GetComponent<CanvasGroup>();
|
|
|
TaoKouDataButton.onClick.AddListener(() => { ChangeData(1); });
|
|
|
+
|
|
|
+ closePanelBtn.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ taskListPanel.gameObject.SetActive(false);
|
|
|
+ taskPointLineRenderer.positionCount = 0;
|
|
|
+ for (int i = 0; i < taskPointIcons.Count; i++)
|
|
|
+ {
|
|
|
+ Destroy(taskPointIcons[i].gameObject);
|
|
|
+ }
|
|
|
+
|
|
|
+ taskPointIcons.Clear();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private async void ChangeData(int type)
|
|
@@ -373,7 +387,7 @@ public class GCYWLayer : YZTRootLayer
|
|
|
taskPointLineRenderer.positionCount = itemsArray.Length;
|
|
|
for (int i = 0; i < taskPointIcons.Count; i++)
|
|
|
{
|
|
|
- taskPointLineRenderer.SetPosition(i, taskPointIcons[i].transform.position += Vector3.up * 50);
|
|
|
+ taskPointLineRenderer.SetPosition(i, taskPointIcons[i].transform.position += Vector3.up * 41);
|
|
|
}
|
|
|
}
|
|
|
|