This commit is contained in:
yulong 2024-03-28 15:59:00 +08:00
parent 071fe49e58
commit 686f17f3aa
8 changed files with 19043 additions and 29 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c3f111386ed74174d8697bcb49480051
timeCreated: 1473254700
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5378,7 +5378,7 @@ MonoBehaviour:
micspeed: 20
micdistance: 0
microwtimer: 0
Destructioneffect: {fileID: 1000013462590818, guid: ecdd96beb7f93494880c052dfccf9dc1,
Destructioneffect: {fileID: 1000013462590818, guid: c3f111386ed74174d8697bcb49480051,
type: 3}
--- !u!54 &-4762106535173360741
Rigidbody:

View File

@ -1965,6 +1965,12 @@ PrefabInstance:
propertyPath: bulletPoint
value:
objectReference: {fileID: 3076048921201743401}
- target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
propertyPath: explodePrefab1
value:
objectReference: {fileID: 1000013462590818, guid: c3f111386ed74174d8697bcb49480051,
type: 3}
- target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
propertyPath: m_Layer

View File

@ -209,7 +209,7 @@ public class Microwaveweapon : MonoBehaviour
/// </summary>
public void Launchattack()
{
if (miceopos != null&&Vector3.Distance(miceopos.position, transform.position) < micdistance)
if (miceopos != null && Vector3.Distance(miceopos.position, transform.position) < micdistance)
{
//micdistance = Vector3.Distance(miceopos.position, transform.position);
var newdata = Getmicdata();
@ -237,6 +237,7 @@ public class Microwaveweapon : MonoBehaviour
if (unmannedAerialVehicle != null)
{
StartCoroutine(Destructiondata(unmannedAerialVehicle));
StartCoroutine(Offlaserstrike());
}
}
@ -245,17 +246,20 @@ public class Microwaveweapon : MonoBehaviour
/// </summary>
public IEnumerator Destructiondata(UnmannedAerialVehicle unmannedAerialVehicle)
{
var newdata = Aeroplane(unmannedAerialVehicle);
MyNetMQClient.instance.Send(newdata);
//DeviceManager.Instance.send2roomStr.Enqueue(newdata);
//MQTTManager.instance.SendData(MQTTManager.instance.Planedata, newdata);
yield return new WaitForSeconds(0.5f);
GameObject game = Instantiate(Destructioneffect, unmannedAerialVehicle.transform);
yield return new WaitForSeconds(0.1f);
game.transform.localPosition = Vector3.zero;
game.transform.SetParent(null);
game.SetActive(true);
Destroy(unmannedAerialVehicle.gameObject);
if (unmannedAerialVehicle)
{
var newdata = Aeroplane(unmannedAerialVehicle);
MyNetMQClient.instance.Send(newdata);
//DeviceManager.Instance.send2roomStr.Enqueue(newdata);
//MQTTManager.instance.SendData(MQTTManager.instance.Planedata, newdata);
yield return new WaitForSeconds(0.5f);
GameObject game = Instantiate(Destructioneffect, unmannedAerialVehicle.transform);
yield return new WaitForSeconds(0.05f);
game.transform.localPosition = Vector3.zero;
game.transform.SetParent(null);
game.SetActive(true);
Destroy(unmannedAerialVehicle.gameObject);
}
}
/// <summary>
@ -274,7 +278,7 @@ public class Microwaveweapon : MonoBehaviour
public IEnumerator Offlaserstrike()
{
yield return new WaitForSeconds(1.5f);
microblog.MicrowaveDisplay(0, 0f);
microblog.MicrowaveDisplay(0f, 0f);
ismicow = false;
}
/// <summary>

View File

@ -158,10 +158,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
/// 判断物体是否在相机里面
/// </summary>
public bool ispcamera;
/// <summary>
/// 激光武器攻击时间
/// </summary>
public static float timer;
void Start()
{
equipmentCommon = GetComponent<EquipmentCommon>();
@ -229,7 +226,6 @@ public class LaserFireControlPlatformManger : MonoBehaviour
StorageIntervalTime = weaponitemone[i].para_value;
lasertime = float.Parse(StorageIntervalTime);
storageIntervalTime = float.Parse(StorageIntervalTime);
timer = storageIntervalTime;
break;
case "毁伤目标累积作用时间:":
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;

View File

@ -224,11 +224,10 @@ public class RadarManger : MonoBehaviour
//Debug.Log("Timer fired at: " + Time.time);
if (LaserFireControlPlatformManger.timer>0)
{
yield return new WaitForSeconds(LaserFireControlPlatformManger.timer); // 等待一段时间后继续执行
RetrievalUAV();
}
yield return new WaitForSeconds(5); // 等待一段时间后继续执行
RetrievalUAV();
//Deadzone();
}
@ -351,14 +350,14 @@ public class RadarManger : MonoBehaviour
continue;
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false && x.lasertime <= 0));
Microwaveweapon microwaveweapon = Microwaveweapon.MicrowaveweaponList.Find(x => x != null && x.ismicow == false);
if (laserFireControlPlatformManger)
if (laserFireControlPlatformManger&& targets!=null)
{
laserFireControlPlatformManger.lasertime = laserFireControlPlatformManger.storageIntervalTime + 1.5f;
laserFireControlPlatformManger.isLasing = true;
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
laserFireControlPlatformManger.Lasing();
}
else if (microwaveweapon)
else if (microwaveweapon&& targets!=null)
{
microwaveweapon.ismicow = true;
microwaveweapon.miceopos = unmannedAerialVehicle.transform;

View File

@ -70,7 +70,10 @@ public class UnmannedAerialVehicle : MonoBehaviour
/// 爆炸预制体
/// </summary>
public GameObject explodePrefab;
/// <summary>
/// 重点目标爆炸预设体
/// </summary>
public GameObject explodePrefab1;
public TextMesh tips;
/// <summary>
/// 攻击目标
@ -125,7 +128,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
+ "编号" + serialNumber + "子无人机" + "自杀式攻击自爆了";
UploadLog(_log);
}
if (explodePrefab && transform)
if (explodePrefab /*&& transform*/)
{
GameObject Bao = Instantiate(explodePrefab, transform);
Bao.transform.localPosition = Vector3.zero;
@ -172,7 +175,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
highPriorityTarget.BeAssaulted(atkPos, true);
}
GameObject Bao = Instantiate(explodePrefab, _transform);
GameObject Bao = Instantiate(explodePrefab1, _transform);
Bao.transform.localPosition = Vector3.zero;
Bao.transform.SetParent(null);
Bao.SetActive(true);