diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab new file mode 100644 index 00000000..4bf20720 --- /dev/null +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab @@ -0,0 +1,159 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8134068106339392507 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6362024693337029893} + - component: {fileID: 3026923956677010357} + - component: {fileID: 1442779148066317741} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6362024693337029893 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8134068106339392507} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.37338635, y: 0.37338635, z: 0.37338635} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4932325705355159533} + m_RootOrder: 0 + 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: 1.7000122} + m_SizeDelta: {x: 80, y: 10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3026923956677010357 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8134068106339392507} + m_CullTransparentMesh: 1 +--- !u!114 &1442779148066317741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8134068106339392507} + 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: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + 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: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u4EFB\u52A1\u4E66" +--- !u!1 &8840111611253122608 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4932325705355159533} + - component: {fileID: 4110177067658581171} + - component: {fileID: 7832223162254303372} + m_Layer: 5 + m_Name: Tips + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &4932325705355159533 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8840111611253122608} + 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: 6362024693337029893} + 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: 0} + m_SizeDelta: {x: 47.483, y: 22.47522} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &4110177067658581171 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8840111611253122608} + m_CullTransparentMesh: 1 +--- !u!114 &7832223162254303372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8840111611253122608} + 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: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 812e8d836d14cd44485231fc8fa79ead, 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 diff --git a/Electrical_inspectionCompetitionSystem/Assets/GameAssets/Models/电箱(new)/Anime.meta b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab.meta similarity index 57% rename from Electrical_inspectionCompetitionSystem/Assets/GameAssets/Models/电箱(new)/Anime.meta rename to Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab.meta index 4c52fe00..94e056ce 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/GameAssets/Models/电箱(new)/Anime.meta +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/Tips.prefab.meta @@ -1,7 +1,6 @@ fileFormatVersion: 2 -guid: b38d3ff374cdd7f419e411e4ac549388 -folderAsset: yes -DefaultImporter: +guid: f8a7b9505ae84b5479d8e906ba48957a +PrefabImporter: externalObjects: {} userData: assetBundleName: diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/工具Item.prefab b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/工具Item.prefab index 6ba1b56a..8c8189e8 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/工具Item.prefab +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Prefabs/Item/工具Item.prefab @@ -121,6 +121,83 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: [] +--- !u!1 &2664533198349620114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 723533276650895034} + - component: {fileID: 8640649142891797553} + - component: {fileID: 6341273563002851753} + m_Layer: 5 + m_Name: Tips + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &723533276650895034 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2664533198349620114} + m_LocalRotation: {x: 1, y: 0, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7706994436517227381} + m_Father: {fileID: 5799929949924204347} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 47.483, y: 22.4752} + m_Pivot: {x: 0.5, y: 0} +--- !u!222 &8640649142891797553 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2664533198349620114} + m_CullTransparentMesh: 1 +--- !u!114 &6341273563002851753 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2664533198349620114} + 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: 812e8d836d14cd44485231fc8fa79ead, 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 &5799929948531248091 GameObject: m_ObjectHideFlags: 0 @@ -275,6 +352,7 @@ RectTransform: m_Children: - {fileID: 5799929948531248090} - {fileID: 1747107931532903586} + - {fileID: 723533276650895034} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -337,3 +415,89 @@ MonoBehaviour: closeButton: {fileID: 1747107931532903587} selfButton: {fileID: 5799929948531248087} showIcon: {fileID: 5799929948531248089} + showName: {fileID: 0} + tips: {fileID: 0} + originPos: {x: 0, y: 0, z: 0} + originAngle: {x: 0, y: 0, z: 0} + prefab: {fileID: 0} + attribute: 0 +--- !u!1 &8865507767033294803 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7706994436517227381} + - component: {fileID: 8489474785670481864} + - component: {fileID: 7982970112488912234} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7706994436517227381 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8865507767033294803} + m_LocalRotation: {x: 1, y: 0, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.37338635, y: 0.37338635, z: 0.37338635} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 723533276650895034} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 1.7} + m_SizeDelta: {x: 80, y: 10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8489474785670481864 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8865507767033294803} + m_CullTransparentMesh: 1 +--- !u!114 &7982970112488912234 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8865507767033294803} + 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: 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u4EFB\u52A1\u4E66" diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity index 662d0112..56d94e2b 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scenes/UI.unity @@ -22974,6 +22974,17 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 229487415} m_CullTransparentMesh: 1 +--- !u!114 &230418245 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1442779148066317741, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + m_PrefabInstance: {fileID: 1000244767} + 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 &230890407 GameObject: m_ObjectHideFlags: 0 @@ -99321,6 +99332,7 @@ RectTransform: - {fileID: 645912385} - {fileID: 881856494} - {fileID: 38503289} + - {fileID: 1000244768} - {fileID: 1461142223} m_Father: {fileID: 277472811} m_RootOrder: 1 @@ -107755,6 +107767,120 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 999851691} m_CullTransparentMesh: 1 +--- !u!1001 &1000244767 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 925169282} + m_Modifications: + - target: {fileID: 1442779148066317741, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_RaycastTarget + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_SizeDelta.x + value: 47.483 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_SizeDelta.y + value: 22.47522 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7832223162254303372, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_RaycastTarget + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8840111611253122608, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_Name + value: Tips + objectReference: {fileID: 0} + - target: {fileID: 8840111611253122608, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} +--- !u!224 &1000244768 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4932325705355159533, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + m_PrefabInstance: {fileID: 1000244767} + m_PrefabAsset: {fileID: 0} --- !u!1 &1000418720 GameObject: m_ObjectHideFlags: 0 @@ -114110,7 +114236,7 @@ Canvas: m_SortingBucketNormalizedSize: 0 m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 - m_SortingOrder: 0 + m_SortingOrder: 2 m_TargetDisplay: 0 --- !u!224 &1067605740 RectTransform: @@ -153472,7 +153598,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 925169282} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -155586,6 +155712,11 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1476449191} m_CullTransparentMesh: 1 +--- !u!1 &1476623015 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8840111611253122608, guid: f8a7b9505ae84b5479d8e906ba48957a, type: 3} + m_PrefabInstance: {fileID: 1000244767} + m_PrefabAsset: {fileID: 0} --- !u!1 &1478883613 GameObject: m_ObjectHideFlags: 0 @@ -225676,7 +225807,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 59702d98d7f84674a943df1984332d6f, type: 3} m_Name: m_EditorClassIdentifier: + NameSelf: "\u5DE5\u4F5C\u8BC1" selfBtn: {fileID: 5799929949428093906} + showName: {fileID: 230418245} + myRect: {fileID: 5799929949178873662} + tips: {fileID: 1476623015} panel: {fileID: 0} modeName: 2 --- !u!114 &5799929949428093906 @@ -225903,7 +226038,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 59702d98d7f84674a943df1984332d6f, type: 3} m_Name: m_EditorClassIdentifier: + NameSelf: "\u79FB\u52A8\u4F5C\u4E1A\u7EC8\u7AEF" selfBtn: {fileID: 5799929948761912364} + showName: {fileID: 230418245} + myRect: {fileID: 5799929950087749824} + tips: {fileID: 1476623015} panel: {fileID: 503037641} modeName: 1 --- !u!222 &6050573552887945181 diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs index 0d25784e..28ea7b32 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/PermanentToolItem.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using DG.Tweening; +using UnityEngine.EventSystems; //============================================================ //支持中文,文件使用UTF-8编码 //@author YangHua @@ -20,11 +21,16 @@ namespace Components WorkCard } - public class PermanentToolItem : MonoBehaviour + public class PermanentToolItem : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler { + public string NameSelf; public Button selfBtn; + public Text showName; + public GameObject tips; public GameObject panel; public ModeName modeName = ModeName.defaultName; + + // Use this for initialization private void Start() { @@ -66,5 +72,17 @@ namespace Components obj.transform.DOLocalRotate(new Vector3(-30f, 0f, 0f), 0.5f); } + + public void OnPointerEnter(PointerEventData eventData) + { + showName.text = NameSelf; + tips.transform.position = transform.position + new Vector3(0, 35, 0); + tips.SetActive(true); + } + + public void OnPointerExit(PointerEventData eventData) + { + tips.SetActive(false); + } } } diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/ToolItem.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/ToolItem.cs index eeb47c60..09cd6abf 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/ToolItem.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/Components/ToolItem.cs @@ -2,6 +2,7 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.EventSystems; using UnityEngine.UI; //============================================================ //支持中文,文件使用UTF-8编码 @@ -12,17 +13,27 @@ using UnityEngine.UI; //@description: //============================================================ -public class ToolItem : MonoBehaviour +public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler { public string toolName; public Button closeButton; public Button selfButton; public Image showIcon; + public Text showName; + public GameObject tips; public Vector3 originPos = new Vector3(); public Vector3 originAngle = new Vector3(); public GameObject prefab; public Attribute attribute = Attribute.defaultModel; - + + private float y; + + + private void Start() + { + tips = UIManager.Instance.ToolsItemManager.toolPanel.transform.Find("Tips").gameObject; + showName = tips.transform.GetChild(0).GetComponent(); + } public void SetValue(string name, Transform modelTransform) { @@ -73,6 +84,7 @@ public class ToolItem : MonoBehaviour private void OnClose() { + tips.SetActive(false); GameObject obj = Instantiate(prefab); obj.name = toolName; obj.transform.localPosition = originPos; @@ -81,6 +93,17 @@ public class ToolItem : MonoBehaviour ToolsItemManager.Instance.RemoveNull(); } + public void OnPointerEnter(PointerEventData eventData) + { + showName.text = toolName; + tips.transform.position = transform.position + new Vector3(0,35 , 0); + tips.SetActive(true); + } + public void OnPointerExit(PointerEventData eventData) + { + tips.SetActive(false); + } + }