From 70ed165471aa06c2abf2dc8d753b288dbeb557db Mon Sep 17 00:00:00 2001
From: YangHua <1475658476@qq.com>
Date: Fri, 19 Jan 2024 09:48:57 +0800
Subject: [PATCH 1/2] eeee

---
 .../AdamTraining_pilot_terminal_panl 1.unity  | 36 +++++++++++--------
 Assets/Zion/Scripts/Adam/GameManager.cs       |  9 +++--
 Assets/Zion/Scripts/Adam/WRJManager.cs        |  4 +--
 .../UAV/UnmannedAerialVehicleManage.cs        | 20 ++++-------
 .../UAV/UnmannedAerialVehicleUI.cs            |  9 +++--
 5 files changed, 42 insertions(+), 36 deletions(-)

diff --git a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity
index 1a69433f..65a112fb 100644
--- a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity	
+++ b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity	
@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 1113159741}
-  m_IndirectSpecularColor: {r: 0.1721589, g: 0.30467987, b: 0.5980986, a: 1}
+  m_IndirectSpecularColor: {r: 0.16286224, g: 0.30626324, b: 0.6662026, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -37132,12 +37132,12 @@ PrefabInstance:
     - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
-      value: SetActive
+      value: SwitchModelScale
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
-      value: 6
+      value: 4
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37187,12 +37187,12 @@ PrefabInstance:
     - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
-      value: SetActive
+      value: SwitchModelScale
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
-      value: 6
+      value: 4
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37242,12 +37242,12 @@ PrefabInstance:
     - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
-      value: SetActive
+      value: SwitchModelScale
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
-      value: 6
+      value: 4
       objectReference: {fileID: 0}
     - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37407,7 +37407,7 @@ PrefabInstance:
     - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
-      value: 6
+      value: 4
       objectReference: {fileID: 0}
     - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37422,7 +37422,7 @@ PrefabInstance:
     - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
-      value: SetActive
+      value: SwitchModelScale
       objectReference: {fileID: 0}
     - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37462,12 +37462,12 @@ PrefabInstance:
     - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
-      value: SetActive
+      value: SwitchModelScale
       objectReference: {fileID: 0}
     - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
       propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
-      value: 6
+      value: 4
       objectReference: {fileID: 0}
     - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
         type: 3}
@@ -37512,12 +37512,18 @@ RectTransform:
     type: 3}
   m_PrefabInstance: {fileID: 729007800}
   m_PrefabAsset: {fileID: 0}
---- !u!1 &729007802 stripped
-GameObject:
-  m_CorrespondingSourceObject: {fileID: 7828191146020959763, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
+--- !u!114 &729007802 stripped
+MonoBehaviour:
+  m_CorrespondingSourceObject: {fileID: 7828191146020959853, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
     type: 3}
   m_PrefabInstance: {fileID: 729007800}
   m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 553d6fe9e2be1ee448fbaa6b5a91ac39, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &732495660
 GameObject:
   m_ObjectHideFlags: 0
@@ -63564,7 +63570,7 @@ MonoBehaviour:
     m_PreInfinity: 2
     m_PostInfinity: 2
     m_RotationOrder: 4
-  randSeed: 9799953
+  randSeed: 104423687
   isDoingTransition: 0
   minimumHeight: 0
 --- !u!114 &1820978574
diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs
index 58d555b0..c11708dd 100644
--- a/Assets/Zion/Scripts/Adam/GameManager.cs
+++ b/Assets/Zion/Scripts/Adam/GameManager.cs
@@ -373,9 +373,12 @@ public class GameManager : MonoSingleton<GameManager>
 
         device.transform.position = new Vector3(float.Parse(deviceTran[0]), float.Parse(deviceTran[1]), float.Parse(deviceTran[2]));
         device.transform.eulerAngles = new Vector3(float.Parse(deviceTran[3]), float.Parse(deviceTran[4]), float.Parse(deviceTran[5]));
-        int wrjModelCount = int.Parse(data.r2);
-        if (device.GetComponent<UnmannedAerialVehicleManage>())
-            device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
+        if (!string.IsNullOrEmpty(data.r2) || data.r2 != "")
+        {
+            int wrjModelCount = int.Parse(data.r2);
+            if (device.GetComponent<UnmannedAerialVehicleManage>())
+                device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
+        }
         device.GetComponent<EquipmentCommon>().deviceID = data.id;
         device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
     }
diff --git a/Assets/Zion/Scripts/Adam/WRJManager.cs b/Assets/Zion/Scripts/Adam/WRJManager.cs
index b7e218f8..07f6b06c 100644
--- a/Assets/Zion/Scripts/Adam/WRJManager.cs
+++ b/Assets/Zion/Scripts/Adam/WRJManager.cs
@@ -33,14 +33,14 @@ namespace Assets.Zion.Scripts.Adam
                         currentWRJ = hitInfo.collider.GetComponent<WRJController>();
                         if (!wRJControllers.Contains(currentWRJ))
                             wRJControllers.Add(currentWRJ);
-                        wrjMenuSetPanel.gameObject.SetActive(true);
+                        wrjMenuSetPanel.localScale = Vector3.one;
                         Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject);
                         wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z);
                     }
                 }
                 else
                 {
-                    wrjMenuSetPanel.gameObject.SetActive(false);
+                    wrjMenuSetPanel.localScale = Vector3.zero;
                 }
             }
 
diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs
index c2a1e220..679ef310 100644
--- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs
+++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs
@@ -282,10 +282,13 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
             if (colliders[i].transform.tag == "AttackTarget")
                 colliders1.Add(colliders[i]);
         }
+
+
+
         if (colliders1.Count > 0)
         {
             isEngagedTarget = true;
-            colliders1.ForEach(x => Debug.Log(x.transform.name));
+            //colliders1.ForEach(x => Debug.Log(x.transform.name));
             int _number = UnityEngine.Random.Range(0, colliders1.Count - 1);
             List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf);
             SendMsg(colliders1[_number].transform);
@@ -310,7 +313,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
     {
         return string.Format("{0},{1},{2},{3},{4}", "SingleDronePosition", equipmentCommon.deviceID,
             attackTarget.position.x, attackTarget.position.y, attackTarget.position.z);
-
     }
 
 
@@ -342,15 +344,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
     /// <param name="weaponitemone"></param>
     public void FillInTheData(List<List_paraItem> weaponitemone)
     {
-        //if (equipmentCommon)
-        //{
-        //    string msg = $"send2room {equipmentCommon.equipmentType}+{transform.position.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")}+{transform.eulerAngles.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")}";
-        //    Debug.Log(msg);
-        //    _ = SyncCreateRoom.SendMessageAsync(msg);
-        //}
         SenceInfo currentSceneInfo = new SenceInfo();
         currentSceneInfo = UIBootstrap.Instance.currentSceneInfo.data;
-        //int windSpeed = Mathf.Lerp(0f, 1f, float.Parse(currentSceneInfo.EnvWindSpeed));
         for (int i = 0; i < weaponitemone.Count; i++)
         {
             switch (weaponitemone[i].para_name)
@@ -512,7 +507,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
                     transform.DOKill();
                     transform.LookAt(new Vector3(-500, 160, 1600));
                     transform.DOMove(new Vector3(-500, 160, 1600), 60);
-
                 }
                 else if (interferenceMode == "迫降")
                 {
@@ -524,11 +518,9 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
                         {
                             hit.point = new Vector3(hit.point.x, hit.point.y + 3, hit.point.z);
                             transform.DOMove(hit.point, 6);
-
                         }
                     }
                 }
-
             }
         }
         if (transmittedPower == "50~100W")
@@ -818,9 +810,9 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
     }
     private void OnDestroy()
     {
-        StopAllCoroutines();
-        Destroy(airRoute.gameObject);
+        StopCoroutine(ShowRadarTips(0, 0));
         OnActivationChanged -= OnActivationChangedHandler;
+        Destroy(airRoute.gameObject);
     }
 
 
diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleUI.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleUI.cs
index 491947ae..e59ff545 100644
--- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleUI.cs
+++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleUI.cs
@@ -17,7 +17,7 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
     // Start is called before the first frame update
     void Start()
     {
-        
+
     }
 
     /// <summary>
@@ -51,10 +51,15 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
                 if (unmannedAerialVehicleManage.airRoute)
                     unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.zero;
             }
-                
+
         }
     }
 
+    public void SwitchModelScale(float scale)
+    {
+        transform.localScale = new Vector3(scale, scale, scale);
+    }
+
     /// <summary>
     /// 切换模式
     /// </summary>

From 0fd0f87d8cf542795eb1a5ca1b464543633db965 Mon Sep 17 00:00:00 2001
From: YangHua <1475658476@qq.com>
Date: Fri, 19 Jan 2024 10:56:31 +0800
Subject: [PATCH 2/2] e

---
 Assets/Zion/Scripts/Adam/GameManager.cs              | 2 --
 Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs
index c11708dd..0bee989e 100644
--- a/Assets/Zion/Scripts/Adam/GameManager.cs
+++ b/Assets/Zion/Scripts/Adam/GameManager.cs
@@ -162,7 +162,6 @@ public class GameManager : MonoSingleton<GameManager>
     {
         SetWeatherValue();
         SetModelValue();
-
         string msg = "getroomusers ";
         _ = SyncCreateRoom.SendMessageAsync(msg);
     }
@@ -175,7 +174,6 @@ public class GameManager : MonoSingleton<GameManager>
             Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
             RaycastHit hitInfo;
             if (Physics.Raycast(ray, out hitInfo, 1000))
-
             {
                 if (hitInfo.collider.tag == "WRJ")
                 {
diff --git a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs
index abf4c5d5..5a302787 100644
--- a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs
+++ b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs
@@ -135,6 +135,7 @@ public class EquipmentCommon : MonoBehaviour
             replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}");
             if (gameObject.GetComponent<UnmannedAerialVehicleManage>())
                 replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
+            //replaceInfoDic.Add("r3",);
             StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
             {
                 ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);