From 164db7c013d8ae7a2a56b23198bd0117567af0d4 Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Tue, 27 Jul 2021 10:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=A1=E7=89=87=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ButtonGroup/BtnContainer-Double-H.prefab | 2 +- .../ButtonGroup/BtnContainer-Watch.prefab | 2 +- .../Resources/UI/Prefab/Race/ItemSmall.prefab | 472 ++++++++++++++---- Assets/Scripts/Apis/Models/MapCompetition.cs | 2 +- .../Scripts/UI/Prefab/Race/RaceHomeScript.cs | 2 + .../Scripts/UI/Prefab/Race/RaceItemScript.cs | 55 +- Assets/Scripts/UI/Prefab/Race/RaceScript.cs | 31 +- 7 files changed, 434 insertions(+), 132 deletions(-) diff --git a/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H.prefab b/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H.prefab index bd6c296f..2ba3e815 100644 --- a/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H.prefab +++ b/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H.prefab @@ -239,7 +239,7 @@ PrefabInstance: - target: {fileID: 3150550772916003707, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} propertyPath: m_Text - value: Cancel Reserve + value: Cancel Apply objectReference: {fileID: 0} - target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} diff --git a/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Watch.prefab b/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Watch.prefab index 7db727e9..7793b9bb 100644 --- a/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Watch.prefab +++ b/Assets/Resources/UI/Prefab/Race/ButtonGroup/BtnContainer-Watch.prefab @@ -208,7 +208,7 @@ PrefabInstance: - target: {fileID: 3150550772916003707, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} propertyPath: m_Text - value: Watch Back + value: Detail objectReference: {fileID: 0} - target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2, type: 3} diff --git a/Assets/Resources/UI/Prefab/Race/ItemSmall.prefab b/Assets/Resources/UI/Prefab/Race/ItemSmall.prefab index 51fb60a6..caac0206 100644 --- a/Assets/Resources/UI/Prefab/Race/ItemSmall.prefab +++ b/Assets/Resources/UI/Prefab/Race/ItemSmall.prefab @@ -32,10 +32,10 @@ RectTransform: m_Father: {fileID: 5916474674030172020} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0} - m_AnchorMax: {x: 0.5, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 150, y: 28} + m_SizeDelta: {x: 0, y: 28} m_Pivot: {x: 0.5, y: 0} --- !u!222 &4967451553077793458 CanvasRenderer: @@ -171,6 +171,139 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 0 +--- !u!1 &1875779720381973549 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5468041636962460519} + - component: {fileID: 449813459798375603} + - component: {fileID: 456280643088181541} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5468041636962460519 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1875779720381973549} + 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: 5521075339206499433} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 1} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &449813459798375603 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1875779720381973549} + m_CullTransparentMesh: 0 +--- !u!114 &456280643088181541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1875779720381973549} + 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: 0.36078432, g: 0.36078432, b: 0.43137258, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + 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 &2071699687578535579 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3712440285028526962} + - component: {fileID: 836378091943164487} + - component: {fileID: 7370565273573660560} + m_Layer: 5 + m_Name: GetReadyContainer-2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3712440285028526962 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2071699687578535579} + 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: + - {fileID: 4384910997898086862} + - {fileID: 2557443790752454192} + m_Father: {fileID: 5521075338391914460} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -203} + m_SizeDelta: {x: -40, y: 39} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &836378091943164487 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2071699687578535579} + m_CullTransparentMesh: 0 +--- !u!225 &7370565273573660560 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2071699687578535579} + m_Enabled: 1 + m_Alpha: 0 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 --- !u!1 &3582975722771982388 GameObject: m_ObjectHideFlags: 0 @@ -272,6 +405,84 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 20 +--- !u!1 &4064341129724416486 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2557443790752454192} + - component: {fileID: 7725169982930950474} + - component: {fileID: 4269627263620556689} + m_Layer: 5 + m_Name: Value + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2557443790752454192 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4064341129724416486} + 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: 3712440285028526962} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 28} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &7725169982930950474 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4064341129724416486} + m_CullTransparentMesh: 0 +--- !u!114 &4269627263620556689 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4064341129724416486} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.97647065, g: 0.18823531, b: 0.5254902, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 7 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: --- !u!1 &4905355044700371948 GameObject: m_ObjectHideFlags: 0 @@ -306,7 +517,7 @@ RectTransform: - {fileID: 3598908100688004633} - {fileID: 2555661253346764242} m_Father: {fileID: 5521075338391914460} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -398,18 +609,18 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075337666401919} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: 5521075338391914460} - m_RootOrder: 3 + m_Father: {fileID: 5521075339293163152} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -40} - m_SizeDelta: {x: 190, y: 75} - m_Pivot: {x: 0.5, y: 1} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 12} + m_SizeDelta: {x: -20, y: -44} + m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5521075337666401906 CanvasRenderer: m_ObjectHideFlags: 0 @@ -460,7 +671,7 @@ CanvasGroup: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075337666401919} m_Enabled: 1 - m_Alpha: 0 + m_Alpha: 1 m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 @@ -566,19 +777,19 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075338227377344} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: - {fileID: 5521075339094088383} - {fileID: 5521075338178123978} - m_Father: {fileID: 5521075339206499433} - m_RootOrder: 3 + m_Father: {fileID: 5521075339293163152} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 160, y: 14} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 10, y: 11} + m_SizeDelta: {x: -20, y: -78} m_Pivot: {x: 0, y: 0} --- !u!222 &5521075338227377350 CanvasRenderer: @@ -620,11 +831,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 6478029046036993396} + - {fileID: 5521075338908913119} + - {fileID: 5521075339206499433} - {fileID: 5521075339293163152} - {fileID: 3781681077856850776} - - {fileID: 5521075337666401916} - {fileID: 713603679570600540} - {fileID: 5916474674030172020} + - {fileID: 3712440285028526962} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -728,8 +941,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 132, y: 0} - m_SizeDelta: {x: 53, y: 14} + m_AnchoredPosition: {x: 126.66666, y: 0} + m_SizeDelta: {x: 63.33333, y: 28} m_Pivot: {x: 0, y: 1} --- !u!222 &5521075338411426010 CanvasRenderer: @@ -774,8 +987,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 66, y: 0} - m_SizeDelta: {x: 66, y: 14} + m_AnchoredPosition: {x: 63.33333, y: 0} + m_SizeDelta: {x: 63.33333, y: 28} m_Pivot: {x: 0, y: 1} --- !u!222 &5521075338442649584 CanvasRenderer: @@ -817,11 +1030,11 @@ RectTransform: m_Father: {fileID: 5521075338625907928} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 7, y: 0} - m_SizeDelta: {x: -14, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -12} + m_SizeDelta: {x: 0, y: 16} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075338488777354 CanvasRenderer: m_ObjectHideFlags: 0 @@ -851,12 +1064,12 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3} - m_FontSize: 10 + m_FontSize: 12 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 1 m_MaxSize: 40 - m_Alignment: 6 + m_Alignment: 7 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -895,11 +1108,11 @@ RectTransform: m_Father: {fileID: 5521075338442649587} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 12, y: 12} - m_Pivot: {x: 0, y: 0.5} + m_SizeDelta: {x: 14, y: 12} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075338553299031 CanvasRenderer: m_ObjectHideFlags: 0 @@ -973,7 +1186,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 66, y: 14} + m_SizeDelta: {x: 63.333332, y: 28} m_Pivot: {x: 0, y: 1} --- !u!222 &5521075338625907929 CanvasRenderer: @@ -1008,17 +1221,17 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075338908913118} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: 5521075339293163152} + m_Father: {fileID: 5521075338391914460} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -53} - m_SizeDelta: {x: 184.22, y: 25.54} + m_AnchoredPosition: {x: 0, y: -40} + m_SizeDelta: {x: 190, y: 60} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075338908913117 CanvasRenderer: @@ -1041,7 +1254,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.9764706, g: 0.1882353, b: 0.5254902, a: 1} + m_Color: {r: 0.9764706, g: 0.1882353, b: 0.5254902, a: 0} m_RaycastTarget: 1 m_Maskable: 1 m_OnCullStateChanged: @@ -1160,11 +1373,11 @@ RectTransform: m_Father: {fileID: 5521075338411426021} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 7, y: 0} - m_SizeDelta: {x: -14, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -12} + m_SizeDelta: {x: 0, y: 16} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339150522623 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1194,12 +1407,12 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3} - m_FontSize: 10 + m_FontSize: 12 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 1 m_MaxSize: 40 - m_Alignment: 6 + m_Alignment: 7 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -1231,22 +1444,22 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075339206499432} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: - {fileID: 5521075338625907928} - {fileID: 5521075338442649587} - {fileID: 5521075338411426021} - - {fileID: 5521075338227377345} - m_Father: {fileID: 5521075339293163152} - m_RootOrder: 0 + - {fileID: 5468041636962460519} + m_Father: {fileID: 5521075338391914460} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 22} - m_SizeDelta: {x: -20, y: -64} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -110.75} + m_SizeDelta: {x: 190, y: 38.25} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339206499438 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1263,7 +1476,7 @@ CanvasGroup: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5521075339206499432} m_Enabled: 1 - m_Alpha: 1 + m_Alpha: 0 m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 @@ -1299,11 +1512,11 @@ RectTransform: m_Father: {fileID: 5521075338411426021} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 12, y: 12} - m_Pivot: {x: 0, y: 0.5} + m_SizeDelta: {x: 14, y: 12} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339239291837 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1353,6 +1566,7 @@ GameObject: - component: {fileID: 5521075339293163153} - component: {fileID: 2730252175564679456} - component: {fileID: 1634826007657528318} + - component: {fileID: 430917176949982921} m_Layer: 5 m_Name: InfoContainer m_TagString: Untagged @@ -1371,15 +1585,15 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 5521075339206499433} - - {fileID: 5521075338908913119} + - {fileID: 5521075337666401916} + - {fileID: 5521075338227377345} m_Father: {fileID: 5521075338391914460} - m_RootOrder: 1 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -207} - m_SizeDelta: {x: 205, y: 98} + m_AnchoredPosition: {x: 0, y: -205} + m_SizeDelta: {x: 190, y: 90} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339293163153 CanvasRenderer: @@ -1431,6 +1645,18 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: radius: 10 +--- !u!225 &430917176949982921 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5521075339293163155} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 --- !u!1 &5521075339401793934 GameObject: m_ObjectHideFlags: 0 @@ -1463,11 +1689,11 @@ RectTransform: m_Father: {fileID: 5521075338442649587} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 7, y: 0} - m_SizeDelta: {x: -14, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -12} + m_SizeDelta: {x: 0, y: 16} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339401793933 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1497,12 +1723,12 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3} - m_FontSize: 10 + m_FontSize: 12 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 1 m_MaxSize: 40 - m_Alignment: 6 + m_Alignment: 7 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -1541,11 +1767,11 @@ RectTransform: m_Father: {fileID: 5521075338625907928} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 12, y: 12} - m_Pivot: {x: 0, y: 0.5} + m_SizeDelta: {x: 14, y: 12} + m_Pivot: {x: 0.5, y: 1} --- !u!222 &5521075339604577757 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1708,10 +1934,10 @@ RectTransform: m_Father: {fileID: 5916474674030172020} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0} - m_AnchorMax: {x: 0.5, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 22} - m_SizeDelta: {x: 70, y: 17} + m_SizeDelta: {x: 0, y: 17} m_Pivot: {x: 0.5, y: 0} --- !u!222 &176685990157428316 CanvasRenderer: @@ -1874,7 +2100,7 @@ RectTransform: m_Children: - {fileID: 1745325752441454819} m_Father: {fileID: 5521075338391914460} - m_RootOrder: 2 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} @@ -1954,6 +2180,84 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 0 +--- !u!1 &7903871935449730197 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4384910997898086862} + - component: {fileID: 7870732234568307154} + - component: {fileID: 6717015698541487457} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4384910997898086862 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7903871935449730197} + 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: 3712440285028526962} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 22} + m_SizeDelta: {x: 0, y: 17} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &7870732234568307154 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7903871935449730197} + m_CullTransparentMesh: 0 +--- !u!114 &6717015698541487457 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7903871935449730197} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.61960787, g: 0.61960787, b: 0.6784314, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 7 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Rice Start Time --- !u!1 &9142377267268215345 GameObject: m_ObjectHideFlags: 0 @@ -1986,12 +2290,12 @@ RectTransform: - {fileID: 3876731566339814338} - {fileID: 499348584704984197} m_Father: {fileID: 5521075338391914460} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -160} - m_SizeDelta: {x: 150, y: 39} + m_SizeDelta: {x: -40, y: 39} m_Pivot: {x: 0.5, y: 1} --- !u!222 &8884367422075164971 CanvasRenderer: @@ -2009,7 +2313,7 @@ CanvasGroup: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 9142377267268215345} m_Enabled: 1 - m_Alpha: 1 + m_Alpha: 0 m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 diff --git a/Assets/Scripts/Apis/Models/MapCompetition.cs b/Assets/Scripts/Apis/Models/MapCompetition.cs index caa5b85f..fe089f04 100644 --- a/Assets/Scripts/Apis/Models/MapCompetition.cs +++ b/Assets/Scripts/Apis/Models/MapCompetition.cs @@ -23,7 +23,7 @@ namespace Assets.Scripts.Apis.Models public int RouteId { get; set; } public string Sponsor { get; set; } public string SponsorCoverage { get; set; } - public string StartApplyTime { get; set; } + public DateTime StartApplyTime { get; set; } public string StartApplyTimeVlaue { get; set; } public DateTime StartTime { get; set; } //public string StartTimeVlaue { get; set; } diff --git a/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs b/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs index dbd8b430..01e0f608 100644 --- a/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs +++ b/Assets/Scripts/UI/Prefab/Race/RaceHomeScript.cs @@ -170,6 +170,7 @@ public class RaceHomeScript : RaceScript void goMove(int i = 1) { //doAni(); + if (startMoveEnd) return; if (!start) startPosition = scroll.horizontalNormalizedPosition; start = true; scrollValue = i * contentSize / 20; @@ -177,6 +178,7 @@ public class RaceHomeScript : RaceScript void goMoveEnd(float pos) { //doAni(); + if (start) return; if (!startMoveEnd) startPosition = scroll.horizontalNormalizedPosition; totalScrollValue = 0; moveEndValue = pos; diff --git a/Assets/Scripts/UI/Prefab/Race/RaceItemScript.cs b/Assets/Scripts/UI/Prefab/Race/RaceItemScript.cs index 01fd66b5..8aa184cb 100644 --- a/Assets/Scripts/UI/Prefab/Race/RaceItemScript.cs +++ b/Assets/Scripts/UI/Prefab/Race/RaceItemScript.cs @@ -28,20 +28,21 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH public void Initial(MapCompetition mapCompetition,Transform parent) { Utils.DisplayImage(transform.GetComponent(), mapCompetition.RouteCover, true); - Utils.DisplayImage(transform.Find("InfoContainer/AltitudeCurve").GetComponent(), mapCompetition.AltitudeGraph, true); - transform.Find("Text").GetComponent().SetTextWithEllipsis(mapCompetition.Title); - transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status == 2); + Utils.DisplayImage(transform.Find("AltitudeCurve").GetComponent(), mapCompetition.AltitudeGraph, true); + transform.Find("InfoContainer/Text").GetComponent().SetTextWithEllipsis(mapCompetition.Title); + transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status != 4); + transform.Find("GetReadyContainer-2").gameObject.SetActive(mapCompetition.Status == 1); //transform.Find("Text").GetComponent().text = mapCompetition.Title; //props.Find("DistanceText").GetComponent().text = $"{myMap.Distance.ToString(myMap.Distance > 1000 ? "#0" : "#0.00")}KM"; //props.Find("EleText").GetComponent().text = $"{(myMap.TotalClimb ?? 0.0).ToString(myMap.TotalClimb > 1000 ? "#0" : "#0.00")}M"; //props.Find("SlopeText").GetComponent().text = $"{myMap.AverageGrade.ToString("#0.00")}%"; - transform.Find("InfoContainer/DataContainer/Distance/Text").GetComponent().text + transform.Find("DataContainer/Distance/Text").GetComponent().text = $"{mapCompetition.Distance.ToString(mapCompetition.Distance > 1000 ? "#0" : "#0.00")}KM"; - transform.Find("InfoContainer/DataContainer/Altitude/Text").GetComponent().text + transform.Find("DataContainer/Altitude/Text").GetComponent().text = $"{(mapCompetition.TotalClimb ?? 0.0).ToString(mapCompetition.TotalClimb > 1000 ? "#0" : "#0.00")}M"; - transform.Find("InfoContainer/DataContainer/Slope/Text").GetComponent().text + transform.Find("DataContainer/Slope/Text").GetComponent().text = $"{mapCompetition.AverageGrade.ToString("#0.00")}%"; - transform.Find("InfoContainer/DataContainer/StartTime/Text").GetComponent().text = mapCompetition.StartTime.ToString(); + transform.Find("InfoContainer/StartTime/Text").GetComponent().text = mapCompetition.StartTime.ToString(); transform.Find("CountContainer/Text").GetComponent().text = mapCompetition.ApplyCount.ToString(); SetStatus(mapCompetition); SetButtonGroup(mapCompetition); @@ -147,17 +148,16 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH { Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); transform.Find("Masking").GetComponent().DOFade(0, 0.5f); - transform.Find("Text").GetComponent().DOFade(0, 0.5f); + transform.Find("AltitudeCurve").GetComponent().DOFade(0, 0.5f); + transform.Find("InfoContainer/Text").GetComponent().DOFade(1, 0.5f); transform.Find("BtnContainer").GetComponent().DOFade(0, 0.5f); transform.Find("CountContainer").GetComponent().DOFade(0, 0.5f); transform.Find("GetReadyContainer").GetComponent().DOFade(0, 0.5f); - - transform.Find("InfoContainer").GetComponent().DOFade(1, 0.5f); + transform.Find("GetReadyContainer-2").GetComponent().DOFade(0, 0.5f); + transform.Find("InfoContainer").GetComponent().DOFade(1, 0.2f); if (myType == ItemType.small) { - transform.Find("InfoContainer/DataContainer").GetComponent().DOFade(1, 0.5f); - transform.Find("InfoContainer/AltitudeCurve").DOScaleY(1f, 0.5f); - transform.Find("InfoContainer").DOLocalMoveY(-207, 0.3f); + transform.Find("DataContainer").GetComponent().DOFade(0, 0.5f); } else { @@ -175,17 +175,16 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH { Cursor.SetCursor(Resources.Load("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto); transform.Find("Masking").GetComponent().DOFade(1, 0.5f); - transform.Find("Text").GetComponent().DOFade(1, 0.5f); + transform.Find("AltitudeCurve").GetComponent().DOFade(1, 0.5f); + transform.Find("InfoContainer/Text").GetComponent().DOFade(0, 0.5f); transform.Find("BtnContainer").GetComponent().DOFade(1, 0.5f); transform.Find("CountContainer").GetComponent().DOFade(1, 0.5f); transform.Find("GetReadyContainer").GetComponent().DOFade(1, 0.5f); - transform.Find("InfoContainer").GetComponent().DOFade(0, 0.5f); + transform.Find("GetReadyContainer-2").GetComponent().DOFade(1, 0.5f); + transform.Find("InfoContainer").GetComponent().DOFade(0, 0.2f); if (myType == ItemType.small) { - transform.Find("InfoContainer/DataContainer").GetComponent().DOFade(0, 0.5f); - //transform.Find("InfoContainer/AltitudeCurve").DOScaleY(1.7f, 0.5f); - transform.Find("InfoContainer").DOLocalMoveY(-124 + 50, 0.3f); - //transform.Find("InfoContainer").DOLocalMoveY(-139, 0.3f); + transform.Find("DataContainer").GetComponent().DOFade(1, 0.5f); } else { @@ -204,24 +203,6 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); } - /* - //先报名 - if (_canJoin) - { - MapCompetitionApi s = new MapCompetitionApi(); - var rrr = s.ApplyMapCompetition(cyclingController.competitionId); - if (rrr.Result.result) - { - var competition = s.GetById(cyclingController.competitionId).data; - _canStart = competition.CanStart; - } - rideNowText.text = "RideNow"; - } - else - { - base.StartRide(baseEvent); - } - */ public void Join() { var res = ConfigHelper.mapCompetitionApi.ApplyMapCompetition(mapCompetition.Id); diff --git a/Assets/Scripts/UI/Prefab/Race/RaceScript.cs b/Assets/Scripts/UI/Prefab/Race/RaceScript.cs index 888bdcbd..a9529e19 100644 --- a/Assets/Scripts/UI/Prefab/Race/RaceScript.cs +++ b/Assets/Scripts/UI/Prefab/Race/RaceScript.cs @@ -54,18 +54,33 @@ public class RaceScript : PFUIPanel if (currentItem != null && currentItem.Find("GetReadyContainer").gameObject.activeSelf) { var map = currentItem.GetComponent().mapCompetition; - var time = map.StartTime.ToLocalTime() - UIManager.Now.GetDateTime(); - if (time.TotalSeconds < 0) + Debug.Log(map.Status); + if (map.Status == 1) { - currentItem.Find("GetReadyContainer").GetComponent().alpha = 0; + currentItem.Find("GetReadyContainer/Title").GetComponent().text = "Application Start Time"; + currentItem.Find("GetReadyContainer/Value").GetComponent().text = + map.StartApplyTime.ToString("yyyy-MM-dd HH:mm"); + currentItem.Find("GetReadyContainer-2/Title").GetComponent().text = "Race Start Time"; + currentItem.Find("GetReadyContainer-2/Value").GetComponent().text = + map.StartTime.ToString("yyyy-MM-dd HH:mm"); } - else + else { - currentItem.Find("GetReadyContainer").GetComponent().alpha = 1; - currentItem.Find("GetReadyContainer/Value").GetComponent().text - = Utils.GetCountDown(time); + //Dictionary + var time = (map.Status == 1 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime(); + if (time.TotalSeconds < 0) + { + currentItem.Find("GetReadyContainer").GetComponent().alpha = 0; + } + else + { + currentItem.Find("GetReadyContainer").GetComponent().alpha = 1; + currentItem.Find("GetReadyContainer/Title").GetComponent().text + = map.Status == 1 ? "Get Ready" : "Riding Time"; + currentItem.Find("GetReadyContainer/Value").GetComponent().text + = Utils.GetCountDown(time); + } } - } }