This commit is contained in:
YangHua 2024-03-31 19:31:17 +08:00
parent d208b87aad
commit 5a76ac15cb
2 changed files with 22 additions and 13 deletions

View File

@ -250,6 +250,8 @@ public class Microwaveweapon : MonoBehaviour
if (wrjList.Count > 0)
{
foreach (var item in wrjList)
{
if (item != null)
{
item.limitHealth -= Time.deltaTime;
if (item.limitHealth <= 0)
@ -260,6 +262,11 @@ public class Microwaveweapon : MonoBehaviour
Destroy(item.gameObject);
}
}
else
{
wrjList.Remove(item);
}
}
}
else
{

View File

@ -66,7 +66,8 @@ public class RadioAngleView : MonoBehaviour
{
Destroy(child.gameObject);
}
if (uavm != null)
{
foreach (GameObject target in targets)
{
Vector3 relativePosition = target.transform.position - uavm.transform.position;
@ -76,6 +77,7 @@ public class RadioAngleView : MonoBehaviour
rt.anchoredPosition = radarPosition;
}
}
}
/// <summary>
/// 获取符合条件的设备
/// </summary>