Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
c758e6e8c4
|
@ -51,13 +51,12 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
|
||||||
{
|
{
|
||||||
if (!isThinck)
|
if (!isThinck)
|
||||||
{
|
{
|
||||||
|
|
||||||
model.GetComponent<EquipmentCommon>().isPlayer = true;
|
model.GetComponent<EquipmentCommon>().isPlayer = true;
|
||||||
model.GetComponent<EquipmentCommon>().isStartRehearsing = GlobalFlag.isStartRehearsing;
|
model.GetComponent<EquipmentCommon>().isStartRehearsing = GlobalFlag.isStartRehearsing;
|
||||||
List<List_paraItem> temp = UIBootstrap.Instance.GetListParaItemById(deviceID);
|
|
||||||
model.GetComponent<EquipmentCommon>().FillInTheData(temp);
|
|
||||||
if (model.GetComponent<UnmannedAerialVehicleManage>())
|
if (model.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
model.GetComponent<UnmannedAerialVehicleManage>().wrjModel = wrjModel;
|
model.GetComponent<UnmannedAerialVehicleManage>().wrjModel = wrjModel;
|
||||||
|
List<List_paraItem> temp = UIBootstrap.Instance.GetListParaItemById(deviceID);
|
||||||
|
model.GetComponent<EquipmentCommon>().FillInTheData(temp);
|
||||||
if (!isDragWRJ)
|
if (!isDragWRJ)
|
||||||
{
|
{
|
||||||
transform.SetAsLastSibling();
|
transform.SetAsLastSibling();
|
||||||
|
|
|
@ -372,6 +372,9 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
|
|
||||||
device.transform.position = new Vector3(float.Parse(deviceTran[0]), float.Parse(deviceTran[1]), float.Parse(deviceTran[2]));
|
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.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;
|
||||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
spectrumdetection.isStartRehearsing = isStartRehearsing;
|
spectrumdetection.isStartRehearsing = isStartRehearsing;
|
||||||
break;
|
break;
|
||||||
case "微波武器":
|
case "微波武器":
|
||||||
Microwaveweapon microwaveweapon= GetComponent<Microwaveweapon>();
|
Microwaveweapon microwaveweapon = GetComponent<Microwaveweapon>();
|
||||||
microwaveweapon.isStartRehearsing = isStartRehearsing;
|
microwaveweapon.isStartRehearsing = isStartRehearsing;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -133,6 +133,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
replaceInfoDic.Add("device_name", equipmentCommon.equipmentType);
|
replaceInfoDic.Add("device_name", equipmentCommon.equipmentType);
|
||||||
replaceInfoDic.Add("para_list", paraListJson);
|
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}");
|
replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}");
|
||||||
|
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
||||||
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
||||||
{
|
{
|
||||||
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
||||||
|
@ -189,14 +190,15 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
UploadLogMain uploadLogMain = new UploadLogMain();
|
UploadLogMain uploadLogMain = new UploadLogMain();
|
||||||
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
|
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
|
||||||
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
|
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
|
||||||
string log = currentTime + " " + equipmentType + "(" + deviceID + ")"+"生成 ";
|
string log = currentTime + " " + equipmentType + "(" + deviceID + ")" + "生成 ";
|
||||||
uploadLogMain.log = log;
|
uploadLogMain.log = log;
|
||||||
uploadLogMains.Add(uploadLogMain);
|
uploadLogMains.Add(uploadLogMain);
|
||||||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||||
WWWForm wWWForm = new WWWForm();
|
WWWForm wWWForm = new WWWForm();
|
||||||
wWWForm.AddField("data", uploadLogMainJson);
|
wWWForm.AddField("data", uploadLogMainJson);
|
||||||
Debug.Log(uploadLogMainJson);
|
Debug.Log(uploadLogMainJson);
|
||||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data => {
|
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||||
|
{
|
||||||
Debug.Log(data);
|
Debug.Log(data);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -280,7 +282,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Planedata":
|
case "Planedata":
|
||||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage1=GetComponent<UnmannedAerialVehicleManage>();
|
UnmannedAerialVehicleManage unmannedAerialVehicleManage1 = GetComponent<UnmannedAerialVehicleManage>();
|
||||||
if (unmannedAerialVehicleManage1)
|
if (unmannedAerialVehicleManage1)
|
||||||
{
|
{
|
||||||
UnmannedAerialVehicle unmannedAerialVehicle = unmannedAerialVehicleManage1.unmannedAerialVehicles.Find(x => x.serialNumber == data[2]);
|
UnmannedAerialVehicle unmannedAerialVehicle = unmannedAerialVehicleManage1.unmannedAerialVehicles.Find(x => x.serialNumber == data[2]);
|
||||||
|
@ -289,7 +291,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
unmannedAerialVehicle.AddBao(false);
|
unmannedAerialVehicle.AddBao(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "SetToBeDestroyed"://设备被销毁
|
case "SetToBeDestroyed"://设备被销毁
|
||||||
GameObject Bao = Instantiate(explodePrefab, transform);
|
GameObject Bao = Instantiate(explodePrefab, transform);
|
||||||
Bao.transform.localPosition = Vector3.zero;
|
Bao.transform.localPosition = Vector3.zero;
|
||||||
|
|
Loading…
Reference in New Issue