diff --git a/xiaofang/Assets/Prefabs/PanelPrefabs/Command_End.prefab b/xiaofang/Assets/Prefabs/PanelPrefabs/Command_End.prefab index 48ecffb3..d273817f 100644 --- a/xiaofang/Assets/Prefabs/PanelPrefabs/Command_End.prefab +++ b/xiaofang/Assets/Prefabs/PanelPrefabs/Command_End.prefab @@ -1933,86 +1933,6 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &1986279547569029179 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1986279547569029156} - - component: {fileID: 1986279547569029158} - - component: {fileID: 1986279547569029157} - m_Layer: 5 - m_Name: TimeText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1986279547569029156 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279547569029179} - 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_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1986279548104501600} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 126.6915, y: 44.1044} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1986279547569029158 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279547569029179} - m_CullTransparentMesh: 1 ---- !u!114 &1986279547569029157 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279547569029179} - 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.74509805, g: 0.9607843, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 36 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 3 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 00:02 --- !u!1 &1986279547577871129 GameObject: m_ObjectHideFlags: 0 @@ -3672,83 +3592,6 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: "4\u5E74\u7EA72\u73ED" ---- !u!1 &1986279548104501607 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1986279548104501600} - - component: {fileID: 1986279548104501602} - - component: {fileID: 1986279548104501601} - m_Layer: 5 - m_Name: TimeBg - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &1986279548104501600 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279548104501607} - 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_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1986279547569029156} - m_Father: {fileID: 1986279549173157411} - m_RootOrder: 9 - 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: -37} - m_SizeDelta: {x: 488, y: 74} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1986279548104501602 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279548104501607} - m_CullTransparentMesh: 1 ---- !u!114 &1986279548104501601 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986279548104501607} - 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: f38af4ec5b0f5bb438566eda1e69c392, 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 &1986279548140014199 GameObject: m_ObjectHideFlags: 0 @@ -11927,3 +11770,116 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 4003788853082971902, guid: a0ad13d6a7cc08a488ec912e2ed7f47d, type: 3} m_PrefabInstance: {fileID: 7441083856479355707} m_PrefabAsset: {fileID: 0} +--- !u!1001 &8774897054539564635 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1986279549173157411} + m_Modifications: + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_SizeDelta.x + value: 488 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_SizeDelta.y + value: 74 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchoredPosition.y + value: -37 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142908, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Name + value: TimeBg + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} +--- !u!114 &1986279547569029157 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7085882780924118654, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + m_PrefabInstance: {fileID: 8774897054539564635} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &1986279548104501600 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + m_PrefabInstance: {fileID: 8774897054539564635} + m_PrefabAsset: {fileID: 0} diff --git a/xiaofang/Assets/Prefabs/PanelPrefabs/OpcOrder2 1.prefab b/xiaofang/Assets/Prefabs/PanelPrefabs/OpcOrder2 1.prefab index 002ddd37..b4675d12 100644 --- a/xiaofang/Assets/Prefabs/PanelPrefabs/OpcOrder2 1.prefab +++ b/xiaofang/Assets/Prefabs/PanelPrefabs/OpcOrder2 1.prefab @@ -20,7 +20,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &46083687380014704 RectTransform: m_ObjectHideFlags: 0 @@ -41,7 +41,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 353.025, y: 188} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 101, y: 203.15999} m_Pivot: {x: 0.5, y: 1} --- !u!114 &2166922752449803930 MonoBehaviour: @@ -157,7 +157,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &46083687645065382 RectTransform: m_ObjectHideFlags: 0 @@ -177,7 +177,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 203.05, y: -155.06} + m_AnchoredPosition: {x: 203.04999, y: -155.06} m_SizeDelta: {x: 344.1, y: 96.2} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &823124465897836687 @@ -559,6 +559,8 @@ MonoBehaviour: contentTransform: {fileID: 46083687380014704} jsonReader: {fileID: 6827591438678571860, guid: 327c725927f3f924d8923cc19bc83385, type: 3} ItemList: [] + name: + hylCS: {fileID: 0} --- !u!114 &5472433620249075691 MonoBehaviour: m_ObjectHideFlags: 0 @@ -650,10 +652,10 @@ RectTransform: m_Father: {fileID: 46083687380014704} m_RootOrder: 0 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: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 203.05, y: -48.1} + m_SizeDelta: {x: 344.1, y: 96.2} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4602151241506608 CanvasRenderer: diff --git a/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab b/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab new file mode 100644 index 00000000..087d951f --- /dev/null +++ b/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab @@ -0,0 +1,159 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7085882780388142908 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7085882780388142907} + - component: {fileID: 7085882780388142905} + - component: {fileID: 7085882780388142906} + m_Layer: 5 + m_Name: TimeBg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &7085882780388142907 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780388142908} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7085882780924118655} + m_Father: {fileID: 0} + 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: -37} + m_SizeDelta: {x: 488, y: 74} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7085882780388142905 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780388142908} + m_CullTransparentMesh: 1 +--- !u!114 &7085882780388142906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780388142908} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: f38af4ec5b0f5bb438566eda1e69c392, 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 &7085882780924118624 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7085882780924118655} + - component: {fileID: 7085882780924118653} + - component: {fileID: 7085882780924118654} + m_Layer: 5 + m_Name: TimeText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7085882780924118655 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780924118624} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7085882780388142907} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 126.6915, y: 44.1044} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7085882780924118653 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780924118624} + m_CullTransparentMesh: 1 +--- !u!114 &7085882780924118654 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7085882780924118624} + 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.74509805, g: 0.9607843, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 36 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 00:02 diff --git a/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab.meta b/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab.meta new file mode 100644 index 00000000..7b539fa9 --- /dev/null +++ b/xiaofang/Assets/Prefabs/PanelPrefabs/TimeBg.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a80b522907f38514cb5d501fa8d84b10 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Res/gsj/scripts/Starthost.cs b/xiaofang/Assets/Res/gsj/scripts/Starthost.cs index 4f1ed96e..adb93748 100644 --- a/xiaofang/Assets/Res/gsj/scripts/Starthost.cs +++ b/xiaofang/Assets/Res/gsj/scripts/Starthost.cs @@ -10,14 +10,16 @@ public class Starthost : MonoBehaviour // 定义委托事件 public delegate void BoolValueChanged(bool newValue); public static event BoolValueChanged OnBoolValueChanged; - + //定义委托事件是否开始 + public delegate void BoolIsStart(bool newValue); + public static event BoolIsStart OnBoolStart; private bool isRotating = false; // 默认旋转状态 private GameObject panel; private Button posiBtn;//人员到位情况按钮 private Button start;//开始演练按钮 public bool isReady;//在线玩家是否准备 public bool isSatisfy;//人员是否满足 - public bool isStart;//演习是否开始 + public bool isStart=false;//演习是否开始 private GameObject time;//计时 private Text timeText;//计时时间 private bool isTimerRunning=false;//是否开始计时 @@ -170,8 +172,7 @@ public class Starthost : MonoBehaviour } //开始进行演习 void OnClickStartBtn() - { - isStart = true; + { if (isSatisfy) { peopleposition.SetActive(false); @@ -190,7 +191,9 @@ public class Starthost : MonoBehaviour //SceneManager.LoadScene(4); //开始计时 isTimerRunning = true; - time.SetActive(true); + time.SetActive(true); + isStart = true; + OnBoolStart?.Invoke(isStart); } else { diff --git a/xiaofang/Assets/Resources/gsjUI/Panel1_2.prefab b/xiaofang/Assets/Resources/gsjUI/Panel1_2.prefab index fe2e5c61..fd048fbb 100644 --- a/xiaofang/Assets/Resources/gsjUI/Panel1_2.prefab +++ b/xiaofang/Assets/Resources/gsjUI/Panel1_2.prefab @@ -318,9 +318,9 @@ RectTransform: m_Father: {fileID: 286532050680097195} m_RootOrder: 0 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -54.0782} m_SizeDelta: {x: 303.2452, y: 108.1564} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &286532049526016700 @@ -795,7 +795,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 121a0c9d8f5a7e946ad99dae6c1203b3, type: 3} + m_Sprite: {fileID: 21300000, guid: 9fb12da871b1c9844a1ea5ffbd224dc0, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1530,7 +1530,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 121a0c9d8f5a7e946ad99dae6c1203b3, type: 3} + m_Sprite: {fileID: 21300000, guid: 1ddcf0d6b99d56e40a2f12a5169cbf81, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1904,9 +1904,9 @@ RectTransform: m_Father: {fileID: 286532050680097195} 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: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -378.54742} m_SizeDelta: {x: 303.2452, y: 108.1564} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &286532049992671429 @@ -2494,7 +2494,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 121a0c9d8f5a7e946ad99dae6c1203b3, type: 3} + m_Sprite: {fileID: 21300000, guid: 20d47785dfd86e046ab5ecc39cdf37c6, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -4332,9 +4332,9 @@ RectTransform: m_Father: {fileID: 286532050680097195} m_RootOrder: 4 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -486.7038} m_SizeDelta: {x: 303.2452, y: 108.1564} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &286532050854345676 @@ -5320,9 +5320,9 @@ RectTransform: m_Father: {fileID: 286532050680097195} m_RootOrder: 2 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -270.391} m_SizeDelta: {x: 303.2452, y: 108.1564} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &286532051015508370 @@ -6226,9 +6226,9 @@ RectTransform: m_Father: {fileID: 286532050680097195} 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -162.2346} m_SizeDelta: {x: 303.2452, y: 108.1564} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &286532051291737756 diff --git a/xiaofang/Assets/Scenes/HylScene/Test.unity b/xiaofang/Assets/Scenes/HylScene/Test.unity index 611b5c3f..b6440980 100644 --- a/xiaofang/Assets/Scenes/HylScene/Test.unity +++ b/xiaofang/Assets/Scenes/HylScene/Test.unity @@ -301,6 +301,11 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 288056020} m_CullTransparentMesh: 1 +--- !u!224 &349546248 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4641918897582544614, guid: 940be89243a038b4090a77556e45a06d, type: 3} + m_PrefabInstance: {fileID: 3077635299975306478} + m_PrefabAsset: {fileID: 0} --- !u!1 &373930957 GameObject: m_ObjectHideFlags: 0 @@ -378,6 +383,16 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 373930957} m_CullTransparentMesh: 1 +--- !u!1 &378331772 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7085882780388142908, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + m_PrefabInstance: {fileID: 998498727} + m_PrefabAsset: {fileID: 0} +--- !u!224 &396693239 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3077635299444999927, guid: 940be89243a038b4090a77556e45a06d, type: 3} + m_PrefabInstance: {fileID: 3077635299975306478} + m_PrefabAsset: {fileID: 0} --- !u!1 &571027939 GameObject: m_ObjectHideFlags: 0 @@ -496,6 +511,123 @@ MonoBehaviour: rectTransform: {fileID: 1248276359} secondMenu: {fileID: 1185717110} firstToggle: {fileID: 571027941} +--- !u!1001 &998498727 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 396693239} + m_Modifications: + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_SizeDelta.x + value: 103.247 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_SizeDelta.y + value: 34.157 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalScale.x + value: 2.0146906 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalScale.y + value: 2.0146906 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalScale.z + value: 2.0146906 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchoredPosition.x + value: -821 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_AnchoredPosition.y + value: -44 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142907, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142908, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Name + value: TimeBg + objectReference: {fileID: 0} + - target: {fileID: 7085882780388142908, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7085882780924118654, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + propertyPath: m_Text + value: 00:00 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} --- !u!1 &1185717110 GameObject: m_ObjectHideFlags: 0 @@ -612,6 +744,17 @@ MonoBehaviour: m_Spacing: {x: 0, y: 0} m_Constraint: 0 m_ConstraintCount: 2 +--- !u!114 &1194367126 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7085882780924118654, guid: a80b522907f38514cb5d501fa8d84b10, type: 3} + m_PrefabInstance: {fileID: 998498727} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1248276358 GameObject: m_ObjectHideFlags: 0 @@ -1083,6 +1226,266 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1001 &1579681314 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 396693239} + m_Modifications: + - target: {fileID: 46083686991999376, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083687380014704, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.x + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 46083687380014704, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.y + value: 226.40001 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.x + value: 344.1 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.y + value: 86.76 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.x + value: 203.05 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065382, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.y + value: -139.02 + objectReference: {fileID: 0} + - target: {fileID: 46083687645065385, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 46083688438047261, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.5000076 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597676, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Name + value: OpcOrder2 1 (1) + objectReference: {fileID: 0} + - target: {fileID: 46083688657597676, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalScale.x + value: 0.9 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalScale.y + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalScale.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.x + value: 1828 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.y + value: 249 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 46083688657597677, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 823124465897836687, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_TargetGraphic + value: + objectReference: {fileID: 1916291583} + - target: {fileID: 823124465897836687, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Colors.m_PressedColor.b + value: 0.09718761 + objectReference: {fileID: 0} + - target: {fileID: 823124465897836687, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Colors.m_PressedColor.g + value: 0.09718761 + objectReference: {fileID: 0} + - target: {fileID: 823124465897836687, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Colors.m_PressedColor.r + value: 0.9811321 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.x + value: 344.1 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_SizeDelta.y + value: 86.76 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.x + value: 203.05 + objectReference: {fileID: 0} + - target: {fileID: 2109125590881905030, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_AnchoredPosition.y + value: -43.38 + objectReference: {fileID: 0} + - target: {fileID: 2166922752449803930, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Spacing.y + value: 8.88 + objectReference: {fileID: 0} + - target: {fileID: 2166922752449803930, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_CellSize.y + value: 86.76 + objectReference: {fileID: 0} + - target: {fileID: 2166922752449803930, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Padding.m_Bottom + value: 44 + objectReference: {fileID: 0} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: Tip + value: + objectReference: {fileID: 1723929262} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: itemPrefab + value: + objectReference: {fileID: 0} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: jsonReader + value: + objectReference: {fileID: 2009348684} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: ItemList.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2410299759049940670, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: ItemList.Array.data[0] + value: + objectReference: {fileID: 1811662063} + - target: {fileID: 6987064875164557437, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_FontData.m_MaxSize + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 6987064875164557437, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_FontData.m_MinSize + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6987064875164557437, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_FontData.m_FontSize + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6987064875164557437, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + propertyPath: m_FontData.m_Alignment + value: 6 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} +--- !u!114 &1581607076 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 46083688438047258, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + m_PrefabInstance: {fileID: 1579681314} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1617184227 GameObject: m_ObjectHideFlags: 0 @@ -1163,6 +1566,44 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1617184227} m_CullTransparentMesh: 1 +--- !u!1 &1723929262 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 46083687380014707, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + m_PrefabInstance: {fileID: 1579681314} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1723929264 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1723929262} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!1 &1811662063 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 46083687645065385, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + m_PrefabInstance: {fileID: 1579681314} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1916291583 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 46083688439670448, guid: 09ab129ab15635d4482ae5617eb97556, type: 3} + m_PrefabInstance: {fileID: 1579681314} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1946593407 GameObject: m_ObjectHideFlags: 0 @@ -1242,6 +1683,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 0 m_VerticalFit: 2 +--- !u!114 &2009348684 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3077635298785468485, guid: 940be89243a038b4090a77556e45a06d, type: 3} + m_PrefabInstance: {fileID: 3077635299975306478} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 13fa0701c49727a4c84282a40243e52d, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &2059853627 GameObject: m_ObjectHideFlags: 0 @@ -1288,6 +1740,29 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2059853627} m_CullTransparentMesh: 1 +--- !u!1 &2079617932 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1809610721369072281, guid: 940be89243a038b4090a77556e45a06d, type: 3} + m_PrefabInstance: {fileID: 3077635299975306478} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2079617935 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2079617932} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e290b8487ad64d4b930e0475ed31321, type: 3} + m_Name: + m_EditorClassIdentifier: + prefab: {fileID: 1811662063} + PrefabTransform: {fileID: 349546248} + text: {fileID: 1581607076} + JSONReader: {fileID: 2009348684} + Time: {fileID: 1194367126} + Timeobject: {fileID: 378331772} --- !u!1 &2118804391 GameObject: m_ObjectHideFlags: 0 @@ -1363,6 +1838,14 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1834348371, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Name + value: progress + objectReference: {fileID: 0} + - target: {fileID: 1834348371, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 750830055985094909, guid: 940be89243a038b4090a77556e45a06d, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -1387,6 +1870,42 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 848627416208138492, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: itemPrefab + value: + objectReference: {fileID: 1811662063} + - target: {fileID: 848627416208138492, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: ItemList.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721369072280, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1809610721856505750, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Text + value: "\u5F15\u5BFC\u758F\u6563" + objectReference: {fileID: 0} - target: {fileID: 2439165017323073229, guid: 940be89243a038b4090a77556e45a06d, type: 3} propertyPath: m_Colors.m_PressedColor.b value: 0.09718761 @@ -1399,6 +1918,10 @@ PrefabInstance: propertyPath: m_Colors.m_PressedColor.r value: 0.9811321 objectReference: {fileID: 0} + - target: {fileID: 3032695104010050648, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Text + value: "\u4E3B\u6301\u4EBA" + objectReference: {fileID: 0} - target: {fileID: 3032695104264456879, guid: 940be89243a038b4090a77556e45a06d, type: 3} propertyPath: m_SizeDelta.x value: 0 @@ -1427,6 +1950,10 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 226.40001 objectReference: {fileID: 0} + - target: {fileID: 3032695105541230308, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} - target: {fileID: 3032695105541230308, guid: 940be89243a038b4090a77556e45a06d, type: 3} propertyPath: m_AnchorMax.y value: 1 @@ -1451,6 +1978,10 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -139.02 objectReference: {fileID: 0} + - target: {fileID: 3032695105541230315, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3077635299444999927, guid: 940be89243a038b4090a77556e45a06d, type: 3} propertyPath: m_Pivot.x value: 0 @@ -1563,5 +2094,26 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -43.38 objectReference: {fileID: 0} - m_RemovedComponents: [] + - target: {fileID: 5860341746553965686, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Spacing.y + value: 35.8 + objectReference: {fileID: 0} + - target: {fileID: 5860341746553965686, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_CellSize.x + value: 280 + objectReference: {fileID: 0} + - target: {fileID: 5860341746553965686, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_CellSize.y + value: 154.49 + objectReference: {fileID: 0} + - target: {fileID: 5860341746553965686, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Padding.m_Top + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 5860341746553965686, guid: 940be89243a038b4090a77556e45a06d, type: 3} + propertyPath: m_Padding.m_Left + value: 30 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 1956227571865497318, guid: 940be89243a038b4090a77556e45a06d, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 940be89243a038b4090a77556e45a06d, type: 3} diff --git a/xiaofang/Assets/Scenes/Tmap 1.unity b/xiaofang/Assets/Scenes/Tmap 1.unity index 613763a1..18c0ba29 100644 --- a/xiaofang/Assets/Scenes/Tmap 1.unity +++ b/xiaofang/Assets/Scenes/Tmap 1.unity @@ -18890,7 +18890,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1039624182 MonoBehaviour: m_ObjectHideFlags: 0 @@ -30109,52 +30109,6 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: [] ---- !u!1 &1669431569 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1669431571} - - component: {fileID: 1669431570} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1669431570 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1669431569} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1669431571 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1669431569} - 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_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 43 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!64 &1669431738 MeshCollider: m_ObjectHideFlags: 0 @@ -32222,6 +32176,52 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 6160620039382372331, guid: 0c9b084f2070bda45b87da961d2eb0f6, type: 3} +--- !u!1 &1787594730 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1787594732} + - component: {fileID: 1787594731} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1787594731 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787594730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &1787594732 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787594730} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 43 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1788785149 PrefabInstance: m_ObjectHideFlags: 0 @@ -38538,7 +38538,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &837023030938325404 MonoBehaviour: m_ObjectHideFlags: 0 @@ -38621,7 +38621,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &837023031067115947 MonoBehaviour: m_ObjectHideFlags: 0 @@ -38704,7 +38704,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &837023031193365524 MonoBehaviour: m_ObjectHideFlags: 0 @@ -38787,7 +38787,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!222 &837023031304053796 CanvasRenderer: m_ObjectHideFlags: 0 @@ -39103,7 +39103,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!222 &837023031586033361 CanvasRenderer: m_ObjectHideFlags: 0 @@ -39617,7 +39617,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!222 &837023032196213114 CanvasRenderer: m_ObjectHideFlags: 0 @@ -47610,6 +47610,7 @@ GameObject: - component: {fileID: 4163391439018457502} - component: {fileID: 4163391439018457568} - component: {fileID: 4163391439018457571} + - component: {fileID: 4163391439018457572} m_Layer: 0 m_Name: TopCamera m_TagString: Untagged @@ -47723,6 +47724,21 @@ MonoBehaviour: rotationRadius: 50 rotationHeight: 5 rotationSpeed: 36 +--- !u!114 &4163391439018457572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4163391439018457500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 596a3807554d7de459064cbc2d74e1fe, type: 3} + m_Name: + m_EditorClassIdentifier: + mainCamera: {fileID: 4163391439018457569} + uiCanvas: {fileID: 5640692783290307689} + targetIconPrefab: {fileID: 8713418931512314564, guid: 00c7bf087b3a01e4bb5cc113b5d6d5fc, type: 3} --- !u!4 &4174389542944889711 Transform: m_ObjectHideFlags: 0 @@ -66822,7 +66838,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -0.000091552734} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: -259.1844} m_Pivot: {x: 0, y: 1} --- !u!1 &5723411037200588897 GameObject: diff --git a/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs b/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs index abbd37c7..78f51e6f 100644 --- a/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs +++ b/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs @@ -136,7 +136,7 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler } public void HandleViewSwipe() { - if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 270 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 90) + if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 260 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 100) { cameraControl.ResetTargetOffsets(); } diff --git a/xiaofang/Assets/Script/UI/ZZZZZZ/Chooselitem8.cs b/xiaofang/Assets/Script/UI/ZZZZZZ/Chooselitem8.cs index 53c95b2f..077d0296 100644 --- a/xiaofang/Assets/Script/UI/ZZZZZZ/Chooselitem8.cs +++ b/xiaofang/Assets/Script/UI/ZZZZZZ/Chooselitem8.cs @@ -10,17 +10,83 @@ public class Chooselitem8 : MonoBehaviour public Text text; public static Chooselitem8 Instance; public JSONReader JSONReader; + + public Text Time;// 要改变颜色的Text组件 + private bool isRed = false; // 当前颜色是否是红色 + private float timeInSeconds; // 当前时间,单位为秒 + public GameObject Timeobject; + private bool isRunning = true; // 控制计时是否继续运行 + public void Start() + { + Instance = this; + InvokeRepeating(nameof(UpdateTimeDisplay), 0f, 1f); + } public void CreateItem(int ID) { - GameObject newitem=Instantiate(prefab,PrefabTransform); + GameObject newitem = Instantiate(prefab, PrefabTransform); foreach (var item in JSONReader.LanguageDictionary) { Language languageData = item.Value; - if (languageData.ID==ID) + if (languageData.ID == ID) { - text.text=languageData.Text; + text.text = languageData.Text; } } } + private void UpdateTimeDisplay() + { + if (!isRunning) return; + // 将时间格式化为 "MM:SS" + string formattedTime = FormatTime(timeInSeconds); + if (Time != null) + { + Time.text = formattedTime; + } + + // 增加时间(每秒) + timeInSeconds++; + // 检查是否达到10秒 + if (timeInSeconds >= 12) + { + isRunning = false; // 停止计时 + CancelInvoke(nameof(UpdateTimeDisplay)); // 停止Invoke调用 + Timeobject.SetActive(false); + } + + } + public void ColorText() + { + StartCoroutine(ChangeTextColor()); + } + /// + /// 协程:每秒切换Text的颜色 + /// + private IEnumerator ChangeTextColor() + { + while (true) + { + if (Time != null) + { + // 切换颜色 + Time.color = isRed ? Color.white : Color.red; + isRed = !isRed; + } + + // 等待1秒 + yield return new WaitForSeconds(1f); + } + } + /// + /// 格式化时间为 "MM:SS" + /// + /// 时间(秒) + /// 格式化后的时间字符串 + private string FormatTime(float time) + { + int minutes = Mathf.FloorToInt(time / 60); // 分钟 + int seconds = Mathf.FloorToInt(time % 60); // 秒 + return $"{minutes:00}:{seconds:00}"; + } + } diff --git a/xiaofang/Assets/Script/UI/ZZZZZZ/FreePanelManager.cs b/xiaofang/Assets/Script/UI/ZZZZZZ/FreePanelManager.cs index 33767c09..4885555a 100644 --- a/xiaofang/Assets/Script/UI/ZZZZZZ/FreePanelManager.cs +++ b/xiaofang/Assets/Script/UI/ZZZZZZ/FreePanelManager.cs @@ -93,6 +93,11 @@ public class FreePanelManager : MonoBehaviour { Z = this; ContainsValue(11002); + // + Chooselitem8.Instance.CreateItem(10800); + Chooselitem8.Instance.CreateItem(10060); + Chooselitem8.Instance.ColorText(); + // if (DirectChildren.Count>=5) { OpcRight.gameObject.SetActive(true); diff --git a/xiaofang/Assets/Script/UI/ZZZZZZ/OpcOrder2.cs b/xiaofang/Assets/Script/UI/ZZZZZZ/OpcOrder2.cs index edac5220..95c96904 100644 --- a/xiaofang/Assets/Script/UI/ZZZZZZ/OpcOrder2.cs +++ b/xiaofang/Assets/Script/UI/ZZZZZZ/OpcOrder2.cs @@ -136,7 +136,7 @@ public class OpcOrder2 : MonoBehaviour public GameObject itemPrefab; // 用于生成的Item预制体 public Transform contentTransform; // Content的Transform public JSONReader jsonReader; - List> groupedData; + public List> groupedData; public List ItemList; public string name; @@ -144,16 +144,17 @@ public class OpcOrder2 : MonoBehaviour int a = 0; private void Start() { + GetOpcID(8006); hylCS = this; btn.onClick.AddListener(() => { bool isActive = Tip.activeSelf; Tip.SetActive(!isActive); - if (ItemList.Count == 1) + if (ItemList.Count == 0) { Debug.Log("进来了"); - CreateItem(2001, 1); + CreateItem(2001, 0); } }); } @@ -168,7 +169,7 @@ public class OpcOrder2 : MonoBehaviour } public void CreateItem(int ID, int k) { - if (k >= 3) + if (k > 3) { if (k == 4) k = 1; if (k == 5) k = 2; @@ -185,6 +186,20 @@ public class OpcOrder2 : MonoBehaviour groupedData = ParseData(select.Role); } } + print(groupedData.Count); + // 检查 k 是否有效 + if (k < 0 || k >= groupedData.Count) + { + Debug.LogError($"索引 k 超出范围!k = {k}, groupedData.Count = {groupedData.Count}"); + return; + } + + // 检查 groupedData[k] 是否为空或无数据 + if (groupedData[k] == null || groupedData[k].Count == 0) + { + Debug.LogError($"groupedData[{k}] 是空或没有数据!"); + return; + } // 动态生成Item并添加到Content for (int i = 0; i < groupedData[k].Count; i++) @@ -217,6 +232,7 @@ public class OpcOrder2 : MonoBehaviour // 点击事件处理函数,支持单独管理 private void OnItemClick(GameObject item, int index) { + Debug.Log("被点击了" + index); if ( item.GetComponentInChildren().text==name) { @@ -240,8 +256,23 @@ public class OpcOrder2 : MonoBehaviour //设置文本 public void SetItemText(int k) { - for (int i = 1; i < ItemList.Count; i++) + // 检查 k 是否有效 + if (k < 0 || k >= groupedData.Count) { + Debug.LogError($"索引 k 超出范围!k = {k}, groupedData.Count = {groupedData.Count}"); + return; + } + + for (int i = 1; i < ItemList.Count+1; i++) + { + // 检查 i 是否超出 groupedData[k] 的范围 + if (i >= groupedData[k].Count) + { + Debug.LogWarning($"索引 i 超出范围!i = {i}, groupedData[{k}].Count = {groupedData[k].Count}"); + break; + } + + Text itemText = ItemList[i].GetComponentInChildren(); if (itemText != null) {