From f0df68bbdaa01187b4f11d17bd25c7e9781be6a2 Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Wed, 12 Jan 2022 10:29:10 +0800 Subject: [PATCH] =?UTF-8?q?banner=20bug=EF=BC=9Bmaxranking=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/BannerController.cs | 22 +++++++++++++------ Assets/Scripts/Scenes/MainController.cs | 2 ++ .../Scripts/UI/Prefab/Panel/HomeController.cs | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Assets/BannerController.cs b/Assets/BannerController.cs index 784b8a2e..7fe45aa8 100644 --- a/Assets/BannerController.cs +++ b/Assets/BannerController.cs @@ -15,6 +15,7 @@ public class BannerController : MonoBehaviour private List standardPositions; private List list; private int currentIndex = 1; + private Dictionary caches; void Awake() { itemList = new List @@ -23,6 +24,7 @@ public class BannerController : MonoBehaviour transform.Find("2").GetComponent(), transform.Find("3").GetComponent() }; + caches = new Dictionary(); standardPositions = new List { transform.Find("1").localPosition,transform.Find("2").localPosition,transform.Find("3").localPosition @@ -130,7 +132,7 @@ public class BannerController : MonoBehaviour { var area = list[index++]; - c.GetComponent().Initial(area); + c.GetComponent().Initial(area, caches); c.GetComponent