1212
This commit is contained in:
parent
d208b87aad
commit
5a76ac15cb
|
@ -251,13 +251,20 @@ public class Microwaveweapon : MonoBehaviour
|
|||
{
|
||||
foreach (var item in wrjList)
|
||||
{
|
||||
item.limitHealth -= Time.deltaTime;
|
||||
if (item.limitHealth <= 0)
|
||||
if (item != null)
|
||||
{
|
||||
var newdata = Aeroplane(item.unmannedAerialVehicles[0]);
|
||||
MyNetMQClient.instance.Send(newdata);
|
||||
DeviceManager.Instance.RemoveDevice(item.gameObject);
|
||||
Destroy(item.gameObject);
|
||||
item.limitHealth -= Time.deltaTime;
|
||||
if (item.limitHealth <= 0)
|
||||
{
|
||||
var newdata = Aeroplane(item.unmannedAerialVehicles[0]);
|
||||
MyNetMQClient.instance.Send(newdata);
|
||||
DeviceManager.Instance.RemoveDevice(item.gameObject);
|
||||
Destroy(item.gameObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wrjList.Remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,14 +66,16 @@ public class RadioAngleView : MonoBehaviour
|
|||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
|
||||
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;
|
||||
GameObject point = Instantiate(targetPointPrefab, rawShow.transform);
|
||||
RectTransform rt = point.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = radarPosition;
|
||||
foreach (GameObject target in targets)
|
||||
{
|
||||
Vector3 relativePosition = target.transform.position - uavm.transform.position;
|
||||
Vector2 radarPosition = new Vector2(relativePosition.x, relativePosition.z) * 0.1f;
|
||||
GameObject point = Instantiate(targetPointPrefab, rawShow.transform);
|
||||
RectTransform rt = point.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = radarPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue