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