Compare commits

..

No commits in common. "f1722f5035664faf64bc20850e0ed57711df2204" and "a01d8e4d009364975f547eba7cd11ed546bc7210" have entirely different histories.

2 changed files with 10 additions and 24 deletions

View File

@ -5,7 +5,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static NetMQ.NetMQSelector;
/// <summary>
/// 微波武器
@ -250,31 +249,24 @@ public class Microwaveweapon : MonoBehaviour
}
if (wrjList.Count > 0)
{
for(int i=0;i< wrjList.Count; i++)
foreach (var item in wrjList)
{
if (wrjList[i] != null)
if (item != null)
{
wrjList[i].limitHealth -= Time.deltaTime;
if (wrjList[i].limitHealth <= 0)
item.limitHealth -= Time.deltaTime;
if (item.limitHealth <= 0)
{
Debug.Log(wrjList[i].name + wrjList[i].equipmentCommon.deviceID + "被销毁");
var newdata = Aeroplane(wrjList[i].unmannedAerialVehicles[0]);
var newdata = Aeroplane(item.unmannedAerialVehicles[0]);
MyNetMQClient.instance.Send(newdata);
DeviceManager.Instance.RemoveDevice(wrjList[i].gameObject);
Destroy(wrjList[i].gameObject);
DeviceManager.Instance.RemoveDevice(item.gameObject);
Destroy(item.gameObject);
}
}
else
{
wrjList.RemoveAt(i);
i--;
wrjList.Remove(item);
}
}
foreach (var item in wrjList)
{
}
}
else
{

View File

@ -66,10 +66,9 @@ public class RadioAngleView : MonoBehaviour
{
Destroy(child.gameObject);
}
foreach (GameObject target in targets)
if (uavm != null)
{
if (uavm != null)
foreach (GameObject target in targets)
{
Vector3 relativePosition = target.transform.position - uavm.transform.position;
Vector2 radarPosition = new Vector2(relativePosition.x, relativePosition.z) * 0.1f;
@ -77,11 +76,6 @@ public class RadioAngleView : MonoBehaviour
RectTransform rt = point.GetComponent<RectTransform>();
rt.anchoredPosition = radarPosition;
}
else
{
Destroy(gameObject);
}
}
}
/// <summary>