From d8e6bad2e40df206f887c1fd12d3d22c70b0f5f2 Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Fri, 24 Nov 2023 15:03:46 +0800 Subject: [PATCH] ew --- .../TEXTURES/mat_galaxy.mat | 2 +- .../TEXTURES/mat_moon.mat | 2 +- Assets/Zion/Scripts/Adam/GameManager.cs | 5 +++++ .../Scripts/ModelFunction/EquipmentCommon.cs | 21 +++++++------------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_galaxy.mat b/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_galaxy.mat index dc853151..3519bd27 100644 --- a/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_galaxy.mat +++ b/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_galaxy.mat @@ -48,7 +48,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - - _GIntensity: 0 + - _GIntensity: 0.1 - _Intensity: 0 - _SIntensity: 1 - _perturbation: 0.405 diff --git a/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_moon.mat b/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_moon.mat index 846a590c..36f8bdcf 100644 --- a/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_moon.mat +++ b/Assets/3rdParty/TENKOKU - DYNAMIC SKY/TEXTURES/mat_moon.mat @@ -33,7 +33,7 @@ Material: - _overBright: 1 m_Colors: - _AmbientTint: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 0.5, g: 0.49803922, b: 0.49215686, a: 0.2} + - _Color: {r: 0, g: 0, b: 0, a: 1} - _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} - _PrimaryTint: {r: 1, g: 1, b: 1, a: 1} - _TintColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index 6de8cad5..ca546039 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -290,6 +290,11 @@ public class GameManager : MonoSingleton device.transform.position = new Vector3(float.Parse(tran[1]), float.Parse(tran[2]), float.Parse(tran[3])); device.transform.eulerAngles = new Vector3(float.Parse(tran[4]), float.Parse(tran[5]), float.Parse(tran[6])); } + + string[] deviceTran = data.r1.Split(','); + + 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])); device.GetComponent().deviceID = data.id; device.GetComponent().FillInTheData(data.list_para); } diff --git a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs index 4b2a9728..b6ab6717 100644 --- a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs +++ b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs @@ -78,7 +78,7 @@ public class EquipmentCommon : MonoBehaviour { if (newValue && equipmentType == "无人机List") { - + } } /// @@ -125,11 +125,12 @@ public class EquipmentCommon : MonoBehaviour replaceInfoDic.Add("PracticeSubjectId", GlobalFlag.practiceSubjectID); replaceInfoDic.Add("device_name", equipmentCommon.equipmentType); replaceInfoDic.Add("para_list", paraListJson); + replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}"); StartCoroutine(AsyncWebReq.PostData2("http://111.229.30.246:48888/Handler/Thinkingfile.ashx?action=addpracticedevicedetail", replaceInfoDic, ResultsInfo => { ReturnDeviceID returnID = JsonConvert.DeserializeObject(ResultsInfo); deviceID = returnID.data; - string msg = $"send2room {equipmentCommon.equipmentType},{transform.position.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")},{transform.eulerAngles.ToString().Replace(" ", "").Replace("(", "").Replace(")", "") + "," + returnID.data}"; + string msg = $"send2room {equipmentCommon.equipmentType},{transform.position.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")},{transform.eulerAngles.ToString().Replace(" ", "").Replace("(", "").Replace(")", "") + "," + deviceID}"; _ = SyncCreateRoom.SendMessageAsync(msg); })); } @@ -159,12 +160,6 @@ public class EquipmentCommon : MonoBehaviour } } - - - private void Update() - { - StartMoveObjectAlongPath(); - } /// /// 已有路径 /// @@ -183,11 +178,11 @@ public class EquipmentCommon : MonoBehaviour Vector3 _positions = positions.Dequeue(); UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent(); if (unmannedAerialVehicleManage) - StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions,true)); // 启动协程,按规划的路线移动物体 + StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions, isMove)); // 启动协程,按规划的路线移动物体 } } - + /// @@ -211,7 +206,7 @@ public class EquipmentCommon : MonoBehaviour UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent(); if (unmannedAerialVehicleManage) { - for(int i=0;i< unmannedAerialVehicleManage.unmannedAerialVehicles.Count; i++) + for (int i = 0; i < unmannedAerialVehicleManage.unmannedAerialVehicles.Count; i++) { if (unmannedAerialVehicleManage.unmannedAerialVehicles[i]) { @@ -231,7 +226,7 @@ public class EquipmentCommon : MonoBehaviour unmannedAerialVehicle.AddBao(false); } } - break; + break; case "SetToBeDestroyed"://设备被销毁 GameObject Bao = Instantiate(explodePrefab, transform); Bao.transform.localPosition = Vector3.zero; @@ -239,7 +234,7 @@ public class EquipmentCommon : MonoBehaviour Bao.SetActive(true); Destroy(transform.gameObject); break; - + default: break; }