This commit is contained in:
parent
79c7dd0edb
commit
2ce0c2d3c7
|
@ -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
|
||||
|
|
|
@ -218,7 +218,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
case "StartDeduction":
|
||||
CheckRoomState();
|
||||
break;
|
||||
case "无人机List":
|
||||
case "蜂群无人机":
|
||||
SpawnDevice(wrjDrag.prefabItem, data);
|
||||
break;
|
||||
case "地面无线电干扰":
|
||||
|
@ -301,7 +301,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
switch (deviceData.data[i].device_name)
|
||||
{
|
||||
case "无人机List":
|
||||
case "蜂群无人机":
|
||||
SpawnDevice(wrjDrag.prefabItem, deviceData.data[i]);
|
||||
break;
|
||||
case "地面无线电干扰":
|
||||
|
|
|
@ -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>();
|
||||
terrestrialRadioInterferenceManger.isStartRehearsing = isStartRehearsing;
|
||||
break;
|
||||
case "无人机List":
|
||||
case "蜂群无人机":
|
||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
||||
unmannedAerialVehicleManage.isStartRehearsing = isStartRehearsing;
|
||||
break;
|
||||
|
@ -151,7 +151,7 @@ public class EquipmentCommon : MonoBehaviour
|
|||
TerrestrialRadioInterferenceManger terrestrialRadioInterferenceManger = GetComponent<TerrestrialRadioInterferenceManger>();
|
||||
terrestrialRadioInterferenceManger.FillInTheData(weaponitemone);
|
||||
break;
|
||||
case "无人机List":
|
||||
case "蜂群无人机":
|
||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
||||
unmannedAerialVehicleManage.FillInTheData(weaponitemone);
|
||||
break;
|
||||
|
|
|
@ -4,6 +4,8 @@ using UnityEngine;
|
|||
using DG.Tweening;
|
||||
using AdamThinkDevicesData;
|
||||
using AdamSync;
|
||||
using Newtonsoft.Json;
|
||||
using static InterfaceManager;
|
||||
|
||||
/// <summary>
|
||||
/// 激光火控平台
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
/// <param name="deviceID"></param>
|
||||
public void UploadLog(string _log)
|
||||
{
|
||||
|
||||
List<UploadLogMain> uploadLogMains = new List<UploadLogMain>();
|
||||
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);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单个无人机被销毁
|
||||
/// </summary>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -7,6 +7,7 @@ using AdamThinkDevicesData;
|
|||
using AdamSync;
|
||||
using System.Linq;
|
||||
using static InterfaceManager;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// 单个无人机蜂群控制
|
||||
|
@ -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
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
/// <param name="deviceID"></param>
|
||||
public void UploadLog(string deviceID)
|
||||
{
|
||||
string currentTime = System.DateTime.Now.ToString();
|
||||
List<UploadLogMain> uploadLogMains = new List<UploadLogMain>();
|
||||
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);
|
||||
}));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 模式切换
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue