From bb8a0712b7ce3806a22fc76ec439f6c00ec8025a Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Thu, 12 Aug 2021 10:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A9=BA=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E9=A1=B5=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/App.cs | 18 +++++++++--------- .../Scripts/UI/Prefab/Race/RaceHomeScript.cs | 5 +++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index d7f4ce45..76a90747 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -11,7 +11,7 @@ using Assets.Scripts.Devices; public static class App { - public static string Host = "http://192.168.0.102:5082/"; + public static string Host = "http://192.168.0.101:5084/"; public static string AppVersion = Application.version; @@ -71,13 +71,13 @@ public static class App static App() { -//#if !UNITY_EDITOR -//// Host = "http://pf.juze.pro/"; -//// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000); -//// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001); -// Host = "https://wx.powerfun.com.cn/"; -// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000); -// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001); -//#endif +#if !UNITY_EDITOR +// Host = "http://pf.juze.pro/"; +// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000); +// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001); + Host = "https://wx.powerfun.com.cn/"; + UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000); + TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001); +#endif } } diff --git a/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs b/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs index f798d936..e74df75c 100644 --- a/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs +++ b/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs @@ -269,6 +269,11 @@ public class RaceHomeScript : RaceScript } private void handleDotList(float totalScrollValue) { + if (content.childCount <= 0) + { + scrollIndex = 0; + return; + } scrollIndex = ((scrollIndex + content.childCount) + (totalScrollValue < 0 ? -1 : 1)) % content.childCount; var dotList = scroll.transform.Find("DotList"); for (int i = 0; i < dotList.childCount; i++)