This commit is contained in:
yulong 2024-03-31 19:32:37 +08:00
parent d208b87aad
commit f6d183ba69
1 changed files with 3 additions and 0 deletions

View File

@ -252,11 +252,14 @@ public class Microwaveweapon : MonoBehaviour
foreach (var item in wrjList)
{
item.limitHealth -= Time.deltaTime;
Debug.Log(item.name + item.equipmentCommon.deviceID + ":" + item.limitHealth);
if (item.limitHealth <= 0)
{
Debug.Log(item.name + item.equipmentCommon.deviceID + "被销毁");
var newdata = Aeroplane(item.unmannedAerialVehicles[0]);
MyNetMQClient.instance.Send(newdata);
DeviceManager.Instance.RemoveDevice(item.gameObject);
wrjList.Remove(item);
Destroy(item.gameObject);
}
}