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