From f3f17c1256907865a9d35918ed81b7fa3c929f7d Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 29 Dec 2021 15:31:01 +0800 Subject: [PATCH] =?UTF-8?q?loading=E9=A1=B5=E9=9D=A2=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Prefab/Ride/Mobile/LoadingPanel.prefab | 18 ++++++++++++++++-- Assets/Resources/UI/language.json | 8 +++++--- .../Scenes/Ride/Scripts/LoadingController.cs | 7 ++++--- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Assets/Resources/UI/Prefab/Ride/Mobile/LoadingPanel.prefab b/Assets/Resources/UI/Prefab/Ride/Mobile/LoadingPanel.prefab index 6bba736e..3d714c1c 100644 --- a/Assets/Resources/UI/Prefab/Ride/Mobile/LoadingPanel.prefab +++ b/Assets/Resources/UI/Prefab/Ride/Mobile/LoadingPanel.prefab @@ -3536,13 +3536,13 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 2 m_MaxSize: 48 - m_Alignment: 0 + m_Alignment: 1 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 1 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Top 10 + m_Text: RANKING --- !u!114 &8872437898649796386 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4219,6 +4219,7 @@ GameObject: - component: {fileID: 4131203580560256159} - component: {fileID: 5921965671833874072} - component: {fileID: 1126882534568575374} + - component: {fileID: 3122355159842659469} m_Layer: 5 m_Name: Text m_TagString: Untagged @@ -4286,6 +4287,19 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: View All +--- !u!114 &3122355159842659469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5635372946248809289} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e47f6ee11b78f3247a0b474b6c36e2cd, type: 3} + m_Name: + m_EditorClassIdentifier: + key: --- !u!1 &6046649886281115850 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/UI/language.json b/Assets/Resources/UI/language.json index b5d43f04..861f2e97 100644 --- a/Assets/Resources/UI/language.json +++ b/Assets/Resources/UI/language.json @@ -53,7 +53,7 @@ "HR": "心率", "SOURCE": "设备", "My Time": "骑行时间", - "RANKING": "排名", + "RANKING": "排行榜", "Join": "报名", "Detail": "查看详情", "Get Ready": "比赛开始倒计时:", @@ -290,7 +290,8 @@ "Did you want to reconnect the trip that was interrupted abnormally?": "你有异常中断的骑行,是否重新连接开始骑行?", "LIST MODE": "线路模式", "Get The First Place. Time Limit": "第一名已产生,倒计时:", - "Competition Time": "比赛时间" + "Competition Time": "比赛时间", + "View All": "查看全部" }, "en": { "HOT ROUTES": "HOT ROUTES", @@ -574,6 +575,7 @@ "Did you want to reconnect the trip that was interrupted abnormally?": "Did you want to reconnect the trip that was interrupted abnormally?", "LIST MODE": "LIST MODE", "Get The First Place. Time Limit": "Get The First Place. Time Limit", - "Competition Time": "Competition Time" + "Competition Time": "Competition Time", + "View All": "View All" } } \ No newline at end of file diff --git a/Assets/Scripts/Scenes/Ride/Scripts/LoadingController.cs b/Assets/Scripts/Scenes/Ride/Scripts/LoadingController.cs index aef4567b..cd6efc87 100644 --- a/Assets/Scripts/Scenes/Ride/Scripts/LoadingController.cs +++ b/Assets/Scripts/Scenes/Ride/Scripts/LoadingController.cs @@ -104,6 +104,7 @@ namespace Assets.Scenes.Ride.Scripts }); #endif } + int RankingPageSize = 8; protected override void InitGameObjectData() { var route = cyclingController.mapRoute; @@ -137,10 +138,10 @@ namespace Assets.Scenes.Ride.Scripts DrawMapRouteAsync(route.Id); AddProcess(10); //查询排行榜 - var list = mapApi.GetRouteRanking(route.Id, "1", 0, 10, ""); + var list = mapApi.GetRouteRanking(route.Id, "1", 0, 10000, ""); if (list.result) { - if (list.data.list.Count > 10) + if (list.data.list.Count > RankingPageSize) { var ViewAll = panel.transform.Find("ViewAll").gameObject; ViewAll.SetActive(true); @@ -172,7 +173,7 @@ namespace Assets.Scenes.Ride.Scripts foreach (var item in list) { index++; - if (index > 10) + if (index > RankingPageSize) break; GameObject newObj = (GameObject)Instantiate(prefab, parent); var selectPlayerItemScript = newObj.GetComponent();