diff --git a/Assets/BannerController.cs b/Assets/BannerController.cs index 475b68e0..b31ee7eb 100644 --- a/Assets/BannerController.cs +++ b/Assets/BannerController.cs @@ -6,6 +6,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; +using UnityEngine.UI; public class BannerController : MonoBehaviour { @@ -16,14 +17,6 @@ public class BannerController : MonoBehaviour private int currentIndex = 1; void Awake() { - UIManager.AddEvent(transform.Find("L").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => - { - Left(); - }); - UIManager.AddEvent(transform.Find("R").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => - { - Right(); - }); itemList = new List { transform.Find("1").GetComponent(), @@ -34,11 +27,15 @@ public class BannerController : MonoBehaviour { transform.Find("1").localPosition,transform.Find("2").localPosition,transform.Find("3").localPosition }; - GetList(); + Debug.Log(standardPositions[0]); Debug.Log(standardPositions[1]); Debug.Log(standardPositions[2]); } + private void Start() + { + GetList(); + } async void GetList() { var res = await ConfigHelper.mapApi.GetRecommendAreaList(); @@ -53,7 +50,20 @@ public class BannerController : MonoBehaviour int index = 0; foreach (CanvasGroup c in itemList) { - c.GetComponent().Initial(list[index++]); + var area = list[index++]; + c.GetComponent().Initial(area); + if (c.alpha != 1) + { + c.GetComponent