From bd8089d0a9043c62786c7cc741bc2141a03d3a1f Mon Sep 17 00:00:00 2001 From: lishuo Date: Thu, 16 Sep 2021 15:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/Mobile.meta | 8 - .../Mobile/CompetitionRankingPanel.prefab | 166 +++++++++++++++++- .../Scenes/Ride/Scripts/BaseUIManager.cs | 5 +- .../Scenes/Ride/Scripts/CyclingController.cs | 11 +- .../UI/Prefab/Panel/BigMapController.cs | 1 + .../UI/Prefab/Panel/RaceAlertController.cs | 2 +- Assets/Scripts/Utils/Utils.cs | 5 + 7 files changed, 176 insertions(+), 22 deletions(-) delete mode 100644 Assets/Resources/Mobile.meta diff --git a/Assets/Resources/Mobile.meta b/Assets/Resources/Mobile.meta deleted file mode 100644 index a76c7270..00000000 --- a/Assets/Resources/Mobile.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f134d222725933a4a8aa79fee0ebc10c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/UI/Prefab/Match/Mobile/CompetitionRankingPanel.prefab b/Assets/Resources/UI/Prefab/Match/Mobile/CompetitionRankingPanel.prefab index a3eabf8c..7dcdd639 100644 --- a/Assets/Resources/UI/Prefab/Match/Mobile/CompetitionRankingPanel.prefab +++ b/Assets/Resources/UI/Prefab/Match/Mobile/CompetitionRankingPanel.prefab @@ -1198,6 +1198,154 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!1 &2283787345660483581 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6423625325705635073} + - component: {fileID: 4531745665127287154} + - component: {fileID: 7308095754115315935} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6423625325705635073 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2283787345660483581} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 7859116899586470020} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 6.5, y: 0} + m_SizeDelta: {x: 13, y: 13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4531745665127287154 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2283787345660483581} + m_CullTransparentMesh: 0 +--- !u!114 &7308095754115315935 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2283787345660483581} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2bcb6d88672d8424a87b5b9dc1f02586, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2761378862937300447 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6046419665604819465} + - component: {fileID: 4481945714566294365} + - component: {fileID: 1272412652630567774} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6046419665604819465 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2761378862937300447} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 6236766253614434138} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -6.5, y: 0} + m_SizeDelta: {x: 13, y: 13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4481945714566294365 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2761378862937300447} + m_CullTransparentMesh: 0 +--- !u!114 &1272412652630567774 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2761378862937300447} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 6ea9e25fc2daef141b55b07acb8c02c3, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &4249898995055343501 GameObject: m_ObjectHideFlags: 0 @@ -1399,13 +1547,14 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 5487564717254417890} + - {fileID: 6423625325705635073} m_Father: {fileID: 341053727791543537} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -32.2, y: 14.7} - m_SizeDelta: {x: 12, y: 12} + m_AnchoredPosition: {x: -30, y: 16.150002} + m_SizeDelta: {x: 30, y: 15} m_Pivot: {x: 0, y: 1} --- !u!222 &546622938314080471 CanvasRenderer: @@ -1428,13 +1577,13 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0} m_RaycastTarget: 1 m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2bcb6d88672d8424a87b5b9dc1f02586, type: 3} + m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1531,13 +1680,14 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 8627770961843808828} + - {fileID: 6046419665604819465} m_Father: {fileID: 341053727791543537} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 20.1, y: 14.7} - m_SizeDelta: {x: 12, y: 12} + m_AnchoredPosition: {x: -0.000022888184, y: 16.149994} + m_SizeDelta: {x: 30, y: 15} m_Pivot: {x: 0, y: 1} --- !u!222 &4326198210780559113 CanvasRenderer: @@ -1560,13 +1710,13 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0} m_RaycastTarget: 1 m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 6ea9e25fc2daef141b55b07acb8c02c3, type: 3} + m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Assets/Scripts/Scenes/Ride/Scripts/BaseUIManager.cs b/Assets/Scripts/Scenes/Ride/Scripts/BaseUIManager.cs index 83c21a80..f2132a47 100644 --- a/Assets/Scripts/Scenes/Ride/Scripts/BaseUIManager.cs +++ b/Assets/Scripts/Scenes/Ride/Scripts/BaseUIManager.cs @@ -492,7 +492,10 @@ namespace Assets.Scenes.Ride.Scripts //切换视角 public void ChangeView(BaseEventData baseEventData) { - mainController.ChangeMapImageStyle(arrow.gameObject); + if (viewButton.interactable) + { + mainController.ChangeMapImageStyle(arrow.gameObject); + } } //结束游戏 protected virtual void StopRide(BaseEventData baseEventData) diff --git a/Assets/Scripts/Scenes/Ride/Scripts/CyclingController.cs b/Assets/Scripts/Scenes/Ride/Scripts/CyclingController.cs index c687f9a0..42001e21 100644 --- a/Assets/Scripts/Scenes/Ride/Scripts/CyclingController.cs +++ b/Assets/Scripts/Scenes/Ride/Scripts/CyclingController.cs @@ -493,10 +493,13 @@ public class CyclingController : DeviceServiceMonoBase onlinePlayerController.SetDataSource(onlineTotalDistance, onlineDistance, onlineRider.Power, onlineRider.HeartRate, onlineRider.Cadence, onlineRider.TotalTicks, onlineRider.NickName, onlineRider.WeightKg, new Vector2d(onlineRider.Point.Latitude, onlineRider.Point.Longitude),index); onlinePlayerController.SetHead(onlineRider.WxHeadImg); - //小地图人物 - GameObject miniPlayer = (GameObject)Instantiate(miniMapPlayerPrefab, transform); - var miniController = miniPlayer.GetComponent(); - miniController.SetController(onlinePlayerController); + if (competitionId == 0) + { + //小地图人物 + GameObject miniPlayer = (GameObject)Instantiate(miniMapPlayerPrefab, transform); + var miniController = miniPlayer.GetComponent(); + miniController.SetController(onlinePlayerController); + } //发消息xx进入路书 if(messageIndex > 0) EventQueueSystem.QueueEvent(new JoinMessageEvent(onlineRider.NickName, onlineRider.WxHeadImg)); diff --git a/Assets/Scripts/UI/Prefab/Panel/BigMapController.cs b/Assets/Scripts/UI/Prefab/Panel/BigMapController.cs index 2e78942d..b77aba78 100644 --- a/Assets/Scripts/UI/Prefab/Panel/BigMapController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/BigMapController.cs @@ -450,6 +450,7 @@ public class BigMapController : PFUIPanel var position = line.BeginMarker.transform.position; //position.z += 25; + position = DefaultPosition(); tips.Show(position, line.Model); foreach (var item in linesCache) diff --git a/Assets/Scripts/UI/Prefab/Panel/RaceAlertController.cs b/Assets/Scripts/UI/Prefab/Panel/RaceAlertController.cs index 10ec75f9..bda6e6b3 100644 --- a/Assets/Scripts/UI/Prefab/Panel/RaceAlertController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/RaceAlertController.cs @@ -53,7 +53,7 @@ namespace Assets.Scenes.Ride.Scripts public void Set(DateTime startTime, DateTime now,string title, string sceneName, int competitionId,int routeId) { ticks = (int)(startTime - now).TotalSeconds; - var content = $"Your {title} race about to start"; + var content = $"Your {Helper.SubStr(title,10)} race about to start"; Content.text = content; CompetitionId = competitionId; RouteId = routeId; diff --git a/Assets/Scripts/Utils/Utils.cs b/Assets/Scripts/Utils/Utils.cs index a0bf49bb..1db75159 100644 --- a/Assets/Scripts/Utils/Utils.cs +++ b/Assets/Scripts/Utils/Utils.cs @@ -177,6 +177,11 @@ namespace Assets.Scripts newLoading.GetComponent().position = new Vector3(Screen.width / 2, Screen.height / 2, 0); newLoading.transform.SetParent(game.transform); loading = newLoading.transform; +#if UNITY_IOS || UNITY_ANDROID + loading.localScale = new Vector3(2, 2, 2); +#else + loading.localScale = new Vector3(1, 1, 1); +#endif } loading.GetComponent().Show(); }