This commit is contained in:
parent
ea2b35a030
commit
d8e6bad2e4
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -290,6 +290,11 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
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<EquipmentCommon>().deviceID = data.id;
|
||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public class EquipmentCommon : MonoBehaviour
|
|||
{
|
||||
if (newValue && equipmentType == "无人机List")
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -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<ReturnDeviceID>(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();
|
||||
}
|
||||
/// <summary>
|
||||
/// 已有路径
|
||||
/// </summary>
|
||||
|
@ -183,11 +178,11 @@ public class EquipmentCommon : MonoBehaviour
|
|||
Vector3 _positions = positions.Dequeue();
|
||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
||||
if (unmannedAerialVehicleManage)
|
||||
StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions,true)); // 启动协程,按规划的路线移动物体
|
||||
StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions, isMove)); // 启动协程,按规划的路线移动物体
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -211,7 +206,7 @@ public class EquipmentCommon : MonoBehaviour
|
|||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue