From cc4c877559f7537e8d1e62607d0088ea2f77c802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=90=8D?= <3077614386@qq.com> Date: Wed, 22 Nov 2023 20:41:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefebs/Models/moder/无人机List.prefab | 153 +++++++++++++++++- Assets/Zion/Scenes/单机演练.unity | 8 +- .../UAV/UnmannedAerialVehicleManage.cs | 7 +- 3 files changed, 159 insertions(+), 9 deletions(-) diff --git a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab index 685d9f94..a7755e8d 100644 --- a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab +++ b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab @@ -206,7 +206,7 @@ MonoBehaviour: selectedSide: 0 equipmentType: "\u65E0\u4EBA\u673AList" deviceID: - replaceInfo: 0 + explodePrefab: {fileID: 0} --- !u!65 &41106886 BoxCollider: m_ObjectHideFlags: 0 @@ -310,7 +310,6 @@ MonoBehaviour: pattern: 0 interval: 5 equipmentCommon: {fileID: -7238547075891962512} - msg: "{\"state\":true,\"message\":\"\",\"data\":[{\"id\":\"1700269207290001\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u7EED\u822A\u65F6\u95F4\uFF1A\",\"para_type\":\"\",\"para_value\":\"28\",\"para_unit\":\"\u5206\u949F\",\"r1\":\"35\u5206\u949F\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290002\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u6297\u98CE\u7B49\u7EA7\uFF1A\",\"para_type\":\"\",\"para_value\":\"4\",\"para_unit\":\"\u7EA7\",\"r1\":\"\u7EA7\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290003\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u6700\u5927\u98DE\u884C\u901F\u5EA6\uFF1A\",\"para_type\":\"\",\"para_value\":\"8\",\"para_unit\":\"m/s\",\"r1\":\"20.0km\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290004\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"RCS\uFF1A\",\"para_type\":\"\",\"para_value\":\"0\",\"para_unit\":\"/\",\"r1\":\"\u201C\u201D\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290005\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u536B\u661F\u5B9A\u4F4D\u9891\u70B9\uFF1A\",\"para_type\":\"\",\"para_value\":\"1\",\"para_unit\":\"/\",\"r1\":\"\u201C\u201D\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290006\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u6570\u636E\u94FE\u901A\u4FE1\u9891\u70B9:\",\"para_type\":\"\",\"para_value\":\"2\",\"para_unit\":\"/\",\"r1\":\"\u201C\u201D\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290007\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u7535\u5B50\u4FA6\u5BDF\u80FD\u529B:\",\"para_type\":\"\",\"para_value\":\"3\",\"para_unit\":\"/\",\"r1\":\"\u201C\u201D\",\"r2\":\"\",\"r3\":\"\"},{\"id\":\"1700269207290008\",\"think_device_id\":\"1700269206959003\",\"para_name\":\"\u5149\u5B66\u4FA6\u5BDF\u80FD\u529B:\",\"para_type\":\"\",\"para_value\":\"2\",\"para_unit\":\"/\",\"r1\":\"\u201C\u201D\",\"r2\":\"\",\"r3\":\"\"}]}" UAVPrefab: {fileID: 7985558213978141209, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} totalObjects: 30 @@ -565,6 +564,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -1432,6 +1436,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -2299,6 +2308,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -3166,6 +3180,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -4033,6 +4052,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -4900,6 +4924,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -5767,6 +5796,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -6634,6 +6668,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -7501,6 +7540,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -8368,6 +8412,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -9235,6 +9284,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -10102,6 +10156,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -10969,6 +11028,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -11836,6 +11900,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -12703,6 +12772,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -13570,6 +13644,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -14437,6 +14516,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -15304,6 +15388,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -16171,6 +16260,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -17038,6 +17132,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -17905,6 +18004,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -18772,6 +18876,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -19639,6 +19748,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -20506,6 +20620,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -21373,6 +21492,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -22240,6 +22364,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -23107,6 +23236,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -23974,6 +24108,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -24841,6 +24980,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer @@ -25708,6 +25852,11 @@ PrefabInstance: propertyPath: detectionRadius value: 200 objectReference: {fileID: 0} + - target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb, + type: 3} + propertyPath: unmannedAerialVehicleManage + value: + objectReference: {fileID: 6644830064356880066} - target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb, type: 3} propertyPath: m_Layer diff --git a/Assets/Zion/Scenes/单机演练.unity b/Assets/Zion/Scenes/单机演练.unity index 2cdeb5eb..05dde3ed 100644 --- a/Assets/Zion/Scenes/单机演练.unity +++ b/Assets/Zion/Scenes/单机演练.unity @@ -767,7 +767,7 @@ PrefabInstance: - target: {fileID: 625513913607457920, guid: 121324ce722bdb944a7cc1c7c3a5077f, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 121324ce722bdb944a7cc1c7c3a5077f, type: 3} @@ -1039,7 +1039,7 @@ PrefabInstance: - target: {fileID: 3977472425108262603, guid: 2b2524df6b4053a4aa08b1f5fe4d62f5, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 2b2524df6b4053a4aa08b1f5fe4d62f5, type: 3} @@ -2006,7 +2006,7 @@ PrefabInstance: - target: {fileID: 7615181139496386322, guid: 7abae14e48a106d4c8120d0eba515162, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7615181139496386328, guid: 7abae14e48a106d4c8120d0eba515162, type: 3} @@ -2085,7 +2085,7 @@ PrefabInstance: - target: {fileID: 7615181139496386322, guid: 7abae14e48a106d4c8120d0eba515162, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7615181139496386328, guid: 7abae14e48a106d4c8120d0eba515162, type: 3} diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index f4142369..f7d8dd71 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -246,11 +246,12 @@ public class UnmannedAerialVehicleManage : MonoBehaviour /// IEnumerator WeaponitemoneDataAddition() { - yield return new WaitForSeconds(0.1f); + yield return new WaitForSeconds(0.01f); for (int i = 0; i < unmannedAerialVehicles.Count; i++) { if (unmannedAerialVehicles[i] != null) { + unmannedAerialVehicles[i].unmannedAerialVehicleManage = this; unmannedAerialVehicles[i].batteryLife = batteryLife; unmannedAerialVehicles[i].classificationWindResistance = classificationWindResistance; unmannedAerialVehicles[i].maximumFlyingSpeed = maximumFlyingSpeed; @@ -259,7 +260,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour unmannedAerialVehicles[i].dataLinkCommunicationFrequency = dataLinkCommunicationFrequency; unmannedAerialVehicles[i].electronicReconnaissanceCapability = electronicReconnaissanceCapability; unmannedAerialVehicles[i].opticalReconnaissanceCapability = opticalReconnaissanceCapability; - unmannedAerialVehicles[i].unmannedAerialVehicleManage = this; + } } } @@ -428,7 +429,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour IEnumerator MoveObjectAlongPath(Vector3 positions) // 协程:按路线移动物体 { - Vector3 targetPosition = new Vector3(positions.x, 10, positions.z);// 目标位置为当前顶点坐标 + Vector3 targetPosition = new Vector3(positions.x, 150, positions.z);// 目标位置为当前顶点坐标 float _distance = Vector3.Distance(transform.position, targetPosition); float _time = _distance / FireSpeed; transform.LookAt(endPosition);