From 734c49f6ed070c17c9da6587ef58a14e510519fa Mon Sep 17 00:00:00 2001 From: chenxiangxue <910695411@qq.com> Date: Thu, 5 Sep 2024 13:22:56 +0800 Subject: [PATCH] ssss --- .../Objects/Tools/三相四线电能表.prefab | 74 +++++++------------ Assets/Scenes/05_LiveScene.unity | 12 +-- .../Devices/现场控制/Device_Control_1002.cs | 2 +- .../Device_3Phase4WireMeter.cs | 8 +- 4 files changed, 37 insertions(+), 59 deletions(-) diff --git a/Assets/Resources/Prefabs/Objects/Tools/三相四线电能表.prefab b/Assets/Resources/Prefabs/Objects/Tools/三相四线电能表.prefab index 7cb9eb0..8e934ef 100644 --- a/Assets/Resources/Prefabs/Objects/Tools/三相四线电能表.prefab +++ b/Assets/Resources/Prefabs/Objects/Tools/三相四线电能表.prefab @@ -111,8 +111,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 503926570506812806} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.061267853, y: -0.020126343, z: -0.10964799} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.061267853, y: 0.020126343, z: -0.10964799} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -571,7 +571,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080142119082} hasElectricity: 0 @@ -773,8 +772,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 811983711441613308} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.0001373291, y: 0.049438477, z: 0.091278076} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.0001373291, y: -0.049438477, z: 0.091278076} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1197,7 +1196,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080266261661} hasElectricity: 1 @@ -1657,7 +1655,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541079990510656} hasElectricity: 1 @@ -1951,7 +1948,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080447090660} hasElectricity: 1 @@ -2666,7 +2662,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080224064224} hasElectricity: 1 @@ -2699,8 +2694,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2537738450205131575} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.06092453, y: -0.020126343, z: -0.10964799} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.06092453, y: 0.020126343, z: -0.10964799} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -3672,8 +3667,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2638763987231761498} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.06092453, y: -0.020126343, z: -0.10964799} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.06092453, y: 0.020126343, z: -0.10964799} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -4246,7 +4241,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081758559536} hasElectricity: 1 @@ -4529,8 +4523,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3491577929125647534} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -4701,7 +4695,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080267980642} hasElectricity: 0 @@ -4995,7 +4988,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081645226417} hasElectricity: 1 @@ -5461,7 +5453,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080183327174} hasElectricity: 1 @@ -5832,7 +5823,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080346864189} hasElectricity: 0 @@ -6381,7 +6371,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541079818901621} hasElectricity: 0 @@ -6503,7 +6492,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080163564030} hasElectricity: 1 @@ -6708,7 +6696,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4675619581299266311} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.14690018, y: -0.17933655, z: 0.5191498} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -6999,8 +6987,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4689876117537848694} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.069568634, y: -0.02281189, z: -0.021592975} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.069568634, y: 0.02281189, z: -0.021592975} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -7283,8 +7271,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4920122536138912573} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.015167236, y: -0.025436401, z: 0.030426025} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.015167236, y: 0.025436401, z: 0.030426025} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -7411,7 +7399,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541079818547023} hasElectricity: 1 @@ -7945,8 +7932,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5739074963520473130} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.040023804, y: -0.02696228, z: 0.037261963} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.040023804, y: 0.02696228, z: 0.037261963} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -8031,8 +8018,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6044607018453959887} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.00012207031, y: 0.011123657, z: -0.09854126} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.00012207031, y: -0.011123657, z: -0.09854126} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -8417,7 +8404,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081608891598} hasElectricity: 1 @@ -8794,7 +8780,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081575823058} hasElectricity: 1 @@ -8996,8 +8981,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6764219220802548366} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.039993286, y: -0.02696228, z: 0.048858643} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.039993286, y: 0.02696228, z: 0.048858643} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -9079,8 +9064,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6776581396377010381} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.00012207031, y: 0.011383057, z: -0.011633396} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.00012207031, y: -0.011383057, z: -0.011633396} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -9510,7 +9495,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080172687080} hasElectricity: 0 @@ -9918,7 +9902,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080598891808} hasElectricity: 0 @@ -10212,7 +10195,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081300379520} hasElectricity: 0 @@ -10242,8 +10224,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7847778419808227353} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.012374878, y: -0.02468872, z: 0.066101074} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: -0.012374878, y: 0.02468872, z: 0.066101074} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -10500,7 +10482,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541081225681401} hasElectricity: 0 @@ -10954,8 +10935,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8569168921652152456} - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.061267853, y: -0.020126343, z: -0.10964799} + m_LocalRotation: {x: -0, y: -0, z: 1, w: 0} + m_LocalPosition: {x: 0.061267853, y: 0.020126343, z: -0.10964799} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -11589,7 +11570,6 @@ MonoBehaviour: _highlight: {fileID: 0} toolType: 11 isMoving: 0 - id: isInstall: 1 installPos: {fileID: 2576541080299287560} hasElectricity: 1 diff --git a/Assets/Scenes/05_LiveScene.unity b/Assets/Scenes/05_LiveScene.unity index 5a95095..2426742 100644 --- a/Assets/Scenes/05_LiveScene.unity +++ b/Assets/Scenes/05_LiveScene.unity @@ -1704,7 +1704,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 478648692} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} m_LocalPosition: {x: 0.14690018, y: -0.17933655, z: 0.5191498} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1712,7 +1712,7 @@ Transform: - {fileID: 238725084} m_Father: {fileID: 543450652271447145} m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} --- !u!65 &478648694 BoxCollider: m_ObjectHideFlags: 0 @@ -8078,7 +8078,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalRotation.x @@ -8086,11 +8086,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -8102,7 +8102,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5209635747906703206, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} propertyPath: m_LocalEulerAnglesHint.z - value: 0 + value: 180 objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 2921358948653541, guid: 10f4454f32eb20e4298912d896f6020e, type: 3} diff --git a/Assets/Scripts/CXX/Devices/现场控制/Device_Control_1002.cs b/Assets/Scripts/CXX/Devices/现场控制/Device_Control_1002.cs index 057c477..39b0269 100644 --- a/Assets/Scripts/CXX/Devices/现场控制/Device_Control_1002.cs +++ b/Assets/Scripts/CXX/Devices/现场控制/Device_Control_1002.cs @@ -70,7 +70,7 @@ public class Device_Control_1002 : Device_Control if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.GetComponent() != null) { meteringDevice = LiveSceneManager.Instance.currentTool.GetComponent(); - meteringDevice.Add(this); + meteringDevice.Add(this, dianTrigger.transform.localPosition, dianTrigger.transform.localEulerAngles); //ù˿¸ֵ check_JieXian.tool_Screws = meteringDevice.jieXian_screws; diff --git a/Assets/Scripts/CXX/Devices/直接接入式电能计量装置/Device_3Phase4WireMeter.cs b/Assets/Scripts/CXX/Devices/直接接入式电能计量装置/Device_3Phase4WireMeter.cs index 3c83e8d..f89248a 100644 --- a/Assets/Scripts/CXX/Devices/直接接入式电能计量装置/Device_3Phase4WireMeter.cs +++ b/Assets/Scripts/CXX/Devices/直接接入式电能计量装置/Device_3Phase4WireMeter.cs @@ -204,7 +204,7 @@ public class Device_3Phase4WireMeter : Device_Base /// /// װܱ /// - public void Add(Device_Control control) + public void Add(Device_Control control,Vector3 localPos,Vector3 localAng) { transform.parent = control.transform; transform.GetComponentsInChildren(true).ToList().ForEach(a => a.Awake()); @@ -212,10 +212,8 @@ public class Device_3Phase4WireMeter : Device_Base Init(false); hand_out_action?.Invoke(); //ɹȥ - transform.DOLocalMove(new Vector3(0.1469002f, -0.1793365f, 0.5191498f), 2).OnStart(() => - { - transform.localEulerAngles = Vector3.zero; - }).OnComplete(() => + transform.localEulerAngles= localAng; + transform.DOLocalMove(localPos, 2).OnComplete(() => { LiveSceneManager.Instance.OnCheckSubProcess(false);