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++)