Compare commits
4 Commits
a01d8e4d00
...
f1722f5035
Author | SHA1 | Date |
---|---|---|
|
f1722f5035 | |
|
876ee00b44 | |
|
cf4b8d2381 | |
|
f6d183ba69 |
|
@ -5,6 +5,7 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static NetMQ.NetMQSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 微波武器
|
||||
|
@ -249,24 +250,31 @@ public class Microwaveweapon : MonoBehaviour
|
|||
}
|
||||
if (wrjList.Count > 0)
|
||||
{
|
||||
foreach (var item in wrjList)
|
||||
for(int i=0;i< wrjList.Count; i++)
|
||||
{
|
||||
if (item != null)
|
||||
if (wrjList[i] != null)
|
||||
{
|
||||
item.limitHealth -= Time.deltaTime;
|
||||
if (item.limitHealth <= 0)
|
||||
wrjList[i].limitHealth -= Time.deltaTime;
|
||||
if (wrjList[i].limitHealth <= 0)
|
||||
{
|
||||
var newdata = Aeroplane(item.unmannedAerialVehicles[0]);
|
||||
Debug.Log(wrjList[i].name + wrjList[i].equipmentCommon.deviceID + "被销毁");
|
||||
var newdata = Aeroplane(wrjList[i].unmannedAerialVehicles[0]);
|
||||
MyNetMQClient.instance.Send(newdata);
|
||||
DeviceManager.Instance.RemoveDevice(item.gameObject);
|
||||
Destroy(item.gameObject);
|
||||
DeviceManager.Instance.RemoveDevice(wrjList[i].gameObject);
|
||||
Destroy(wrjList[i].gameObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wrjList.Remove(item);
|
||||
wrjList.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
foreach (var item in wrjList)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -66,9 +66,10 @@ public class RadioAngleView : MonoBehaviour
|
|||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
if (uavm != null)
|
||||
|
||||
foreach (GameObject target in targets)
|
||||
{
|
||||
foreach (GameObject target in targets)
|
||||
if (uavm != null)
|
||||
{
|
||||
Vector3 relativePosition = target.transform.position - uavm.transform.position;
|
||||
Vector2 radarPosition = new Vector2(relativePosition.x, relativePosition.z) * 0.1f;
|
||||
|
@ -76,6 +77,11 @@ public class RadioAngleView : MonoBehaviour
|
|||
RectTransform rt = point.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = radarPosition;
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue