diff --git a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab index c0bba40c..1c820c7f 100644 --- a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab +++ b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab @@ -204,10 +204,11 @@ MonoBehaviour: m_EditorClassIdentifier: equipmentCommon: {fileID: 0} selectedSide: 0 - equipmentType: "\u65E0\u4EBA\u673AList" + equipmentType: "\u8702\u7FA4\u65E0\u4EBA\u673A" deviceID: explodePrefab: {fileID: 1000013462590818, guid: ecdd96beb7f93494880c052dfccf9dc1, type: 3} + isMove: 1 --- !u!65 &41106886 BoxCollider: m_ObjectHideFlags: 0 diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index 48c09c75..cb439452 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -218,7 +218,7 @@ public class GameManager : MonoSingleton case "StartDeduction": CheckRoomState(); break; - case "无人机List": + case "蜂群无人机": SpawnDevice(wrjDrag.prefabItem, data); break; case "地面无线电干扰": @@ -301,7 +301,7 @@ public class GameManager : MonoSingleton { switch (deviceData.data[i].device_name) { - case "无人机List": + case "蜂群无人机": SpawnDevice(wrjDrag.prefabItem, deviceData.data[i]); break; case "地面无线电干扰": diff --git a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs index 4f43233d..03e478d2 100644 --- a/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs +++ b/Assets/Zion/Scripts/ModelFunction/EquipmentCommon.cs @@ -75,7 +75,7 @@ public class EquipmentCommon : MonoBehaviour } void OnActivationChangedIsPlayer(bool newValue) { - if (newValue && equipmentType == "无人机List") + if (newValue && equipmentType == "蜂群无人机") { } @@ -100,7 +100,7 @@ public class EquipmentCommon : MonoBehaviour TerrestrialRadioInterferenceManger terrestrialRadioInterferenceManger = GetComponent(); terrestrialRadioInterferenceManger.isStartRehearsing = isStartRehearsing; break; - case "无人机List": + case "蜂群无人机": UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent(); unmannedAerialVehicleManage.isStartRehearsing = isStartRehearsing; break; @@ -151,7 +151,7 @@ public class EquipmentCommon : MonoBehaviour TerrestrialRadioInterferenceManger terrestrialRadioInterferenceManger = GetComponent(); terrestrialRadioInterferenceManger.FillInTheData(weaponitemone); break; - case "无人机List": + case "蜂群无人机": UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent(); unmannedAerialVehicleManage.FillInTheData(weaponitemone); break; diff --git a/Assets/Zion/Scripts/ModelFunction/LaserFireControlPlatform/LaserFireControlPlatformManger.cs b/Assets/Zion/Scripts/ModelFunction/LaserFireControlPlatform/LaserFireControlPlatformManger.cs index fc3b17c3..b7153b7e 100644 --- a/Assets/Zion/Scripts/ModelFunction/LaserFireControlPlatform/LaserFireControlPlatformManger.cs +++ b/Assets/Zion/Scripts/ModelFunction/LaserFireControlPlatform/LaserFireControlPlatformManger.cs @@ -4,6 +4,8 @@ using UnityEngine; using DG.Tweening; using AdamThinkDevicesData; using AdamSync; +using Newtonsoft.Json; +using static InterfaceManager; /// /// 激光火控平台 @@ -238,6 +240,11 @@ public class LaserFireControlPlatformManger : MonoBehaviour string nowData = GetSyncDis(unmannedAerialVehicle); Debug.Log(nowData); DeviceManager.Instance.send2roomStr.Enqueue(nowData); + string currentTime = System.DateTime.Now.ToString(); + string _log = currentTime + " " + equipmentCommon.equipmentType + "(" + equipmentCommon.deviceID + ")" + + "攻击了销毁了" + unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.equipmentType + "(" + unmannedAerialVehicle.unmannedAerialVehicleManage.equipmentCommon.deviceID + ")" + + "编号" + unmannedAerialVehicle.serialNumber + "子无人机"; + UploadLog(_log); GameObject Bao = Instantiate(explodePrefab, unmannedAerialVehicle.transform); Bao.transform.localPosition = Vector3.zero; Bao.transform.SetParent(null); @@ -245,6 +252,30 @@ public class LaserFireControlPlatformManger : MonoBehaviour Destroy(unmannedAerialVehicle.gameObject); } + /// + ///上传日志 + /// + /// + public void UploadLog(string _log) + { + + List uploadLogMains = new List(); + UploadLogMain uploadLogMain = new UploadLogMain(); + uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID; + uploadLogMain.ThinkId = GlobalFlag.currentThinkId; + uploadLogMain.log = _log; + uploadLogMains.Add(uploadLogMain); + string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains); + WWWForm wWWForm = new WWWForm(); + wWWForm.AddField("data", uploadLogMainJson); + Debug.Log(uploadLogMainJson); + StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data => { + Debug.Log(data); + })); + } + + + /// /// 单个无人机被销毁 /// diff --git a/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs b/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs index 3564cbc9..58239316 100644 --- a/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs +++ b/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs @@ -258,7 +258,6 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour UploadLogMain uploadLogMain = new UploadLogMain(); uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID; uploadLogMain.ThinkId = GlobalFlag.currentThinkId; - string log = uploadLogMain.log = _log; uploadLogMains.Add(uploadLogMain); string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains); diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index 57ba7e25..a507419f 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -7,6 +7,7 @@ using AdamThinkDevicesData; using AdamSync; using System.Linq; using static InterfaceManager; +using Newtonsoft.Json; /// /// 单个无人机蜂群控制 @@ -168,6 +169,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour string nowData = string.Format("{0},{1}", "SetToBeDestroyed", equipmentCommon.deviceID); Debug.Log(nowData); _ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData)); + UploadLog(equipmentCommon.deviceID); WWWForm headers = new WWWForm(); headers.AddField("id", equipmentCommon.deviceID); StartCoroutine(PostString(Url_Deletepracticedevicedetail, headers, data => { @@ -180,6 +182,29 @@ public class UnmannedAerialVehicleManage : MonoBehaviour } + /// + ///上传日志 + /// + /// + public void UploadLog(string deviceID) + { + string currentTime = System.DateTime.Now.ToString(); + List uploadLogMains = new List(); + UploadLogMain uploadLogMain = new UploadLogMain(); + uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID; + uploadLogMain.ThinkId = GlobalFlag.currentThinkId; + string log = currentTime + " " + equipmentCommon.equipmentType + "(" + deviceID + ")" + "被成建制销毁了 "; + uploadLogMain.log = log; + uploadLogMains.Add(uploadLogMain); + string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains); + WWWForm wWWForm = new WWWForm(); + wWWForm.AddField("data", uploadLogMainJson); + Debug.Log(uploadLogMainJson); + StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data => { + Debug.Log(data); + })); + } + /// /// 模式切换 ///