This commit is contained in:
parent
84cb3d4a98
commit
67ffe69bc8
|
@ -181,7 +181,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
Vector3 _positions = positions.Dequeue();
|
Vector3 _positions = positions.Dequeue();
|
||||||
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
UnmannedAerialVehicleManage unmannedAerialVehicleManage = GetComponent<UnmannedAerialVehicleManage>();
|
||||||
if (unmannedAerialVehicleManage)
|
if (unmannedAerialVehicleManage)
|
||||||
StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions, isMove)); // 启动协程,按规划的路线移动物体
|
StartCoroutine(unmannedAerialVehicleManage.MoveObjectAlongPath(_positions, true)); // 启动协程,按规划的路线移动物体
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
public void NonSelfGeneratedEmissionLaser(string[] data)
|
public void NonSelfGeneratedEmissionLaser(string[] data)
|
||||||
{
|
{
|
||||||
Vector3 vector3 = new Vector3(float.Parse(data[2]), float.Parse(data[3]), float.Parse(data[4]));
|
Vector3 vector3 = new Vector3(float.Parse(data[2]), float.Parse(data[3]), float.Parse(data[4]));
|
||||||
|
LaserModer.transform.DOLookAt(vector3, 0.1f).OnComplete(() => {
|
||||||
if (InnerLaserlineRenderer)
|
if (InnerLaserlineRenderer)
|
||||||
{
|
{
|
||||||
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
|
@ -275,6 +276,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
OuterLaserlineRenderer.SetPosition(1, vector3); // 设置线段终点为目标点
|
OuterLaserlineRenderer.SetPosition(1, vector3); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
StartCoroutine(LaserExtinction());
|
StartCoroutine(LaserExtinction());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
|
|
|
@ -156,9 +156,9 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
string nowData = string.Format("{0},{1}", "SetToBeDestroyed", _equipmentCommon.deviceID);
|
string nowData = string.Format("{0},{1}", "SetToBeDestroyed", _equipmentCommon.deviceID);
|
||||||
Debug.Log(nowData);
|
Debug.Log(nowData);
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
||||||
Dictionary<string, string> headers = new Dictionary<string, string>();
|
WWWForm headers = new WWWForm();
|
||||||
headers.Add("id", _equipmentCommon.deviceID);
|
headers.AddField("id", _equipmentCommon.deviceID);
|
||||||
StartCoroutine(GetString(Url_Deletepracticedevicedetail, headers, data => {
|
StartCoroutine(PostString(Url_Deletepracticedevicedetail, headers, data => {
|
||||||
Debug.Log(data);
|
Debug.Log(data);
|
||||||
}));
|
}));
|
||||||
GameObject Bao = Instantiate(explodePrefab, _transform);
|
GameObject Bao = Instantiate(explodePrefab, _transform);
|
||||||
|
|
|
@ -163,14 +163,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
var _unmannedAerialVehicle = unmannedAerialVehicles.FindAll(x => x != null);
|
var _unmannedAerialVehicle = unmannedAerialVehicles.FindAll(x => x != null);
|
||||||
if (_unmannedAerialVehicle==null)
|
if (_unmannedAerialVehicle.Count==0)
|
||||||
{
|
{
|
||||||
string nowData = string.Format("{0},{1}", "SetToBeDestroyed", equipmentCommon.deviceID);
|
string nowData = string.Format("{0},{1}", "SetToBeDestroyed", equipmentCommon.deviceID);
|
||||||
Debug.Log(nowData);
|
Debug.Log(nowData);
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
||||||
Dictionary<string, string> headers = new Dictionary<string, string>();
|
WWWForm headers = new WWWForm();
|
||||||
headers.Add("id", equipmentCommon.deviceID);
|
headers.AddField("id", equipmentCommon.deviceID);
|
||||||
StartCoroutine(GetString(Url_Deletepracticedevicedetail, headers, data => {
|
StartCoroutine(PostString(Url_Deletepracticedevicedetail, headers, data => {
|
||||||
Debug.Log(data);
|
Debug.Log(data);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue