This commit is contained in:
parent
071fe49e58
commit
686f17f3aa
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c3f111386ed74174d8697bcb49480051
|
||||||
|
timeCreated: 1473254700
|
||||||
|
licenseType: Store
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -5378,7 +5378,7 @@ MonoBehaviour:
|
||||||
micspeed: 20
|
micspeed: 20
|
||||||
micdistance: 0
|
micdistance: 0
|
||||||
microwtimer: 0
|
microwtimer: 0
|
||||||
Destructioneffect: {fileID: 1000013462590818, guid: ecdd96beb7f93494880c052dfccf9dc1,
|
Destructioneffect: {fileID: 1000013462590818, guid: c3f111386ed74174d8697bcb49480051,
|
||||||
type: 3}
|
type: 3}
|
||||||
--- !u!54 &-4762106535173360741
|
--- !u!54 &-4762106535173360741
|
||||||
Rigidbody:
|
Rigidbody:
|
||||||
|
|
|
@ -1965,6 +1965,12 @@ PrefabInstance:
|
||||||
propertyPath: bulletPoint
|
propertyPath: bulletPoint
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 3076048921201743401}
|
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,
|
- target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class Microwaveweapon : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Launchattack()
|
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);
|
//micdistance = Vector3.Distance(miceopos.position, transform.position);
|
||||||
var newdata = Getmicdata();
|
var newdata = Getmicdata();
|
||||||
|
@ -237,6 +237,7 @@ public class Microwaveweapon : MonoBehaviour
|
||||||
if (unmannedAerialVehicle != null)
|
if (unmannedAerialVehicle != null)
|
||||||
{
|
{
|
||||||
StartCoroutine(Destructiondata(unmannedAerialVehicle));
|
StartCoroutine(Destructiondata(unmannedAerialVehicle));
|
||||||
|
|
||||||
StartCoroutine(Offlaserstrike());
|
StartCoroutine(Offlaserstrike());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,17 +246,20 @@ public class Microwaveweapon : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerator Destructiondata(UnmannedAerialVehicle unmannedAerialVehicle)
|
public IEnumerator Destructiondata(UnmannedAerialVehicle unmannedAerialVehicle)
|
||||||
{
|
{
|
||||||
var newdata = Aeroplane(unmannedAerialVehicle);
|
if (unmannedAerialVehicle)
|
||||||
MyNetMQClient.instance.Send(newdata);
|
{
|
||||||
//DeviceManager.Instance.send2roomStr.Enqueue(newdata);
|
var newdata = Aeroplane(unmannedAerialVehicle);
|
||||||
//MQTTManager.instance.SendData(MQTTManager.instance.Planedata, newdata);
|
MyNetMQClient.instance.Send(newdata);
|
||||||
yield return new WaitForSeconds(0.5f);
|
//DeviceManager.Instance.send2roomStr.Enqueue(newdata);
|
||||||
GameObject game = Instantiate(Destructioneffect, unmannedAerialVehicle.transform);
|
//MQTTManager.instance.SendData(MQTTManager.instance.Planedata, newdata);
|
||||||
yield return new WaitForSeconds(0.1f);
|
yield return new WaitForSeconds(0.5f);
|
||||||
game.transform.localPosition = Vector3.zero;
|
GameObject game = Instantiate(Destructioneffect, unmannedAerialVehicle.transform);
|
||||||
game.transform.SetParent(null);
|
yield return new WaitForSeconds(0.05f);
|
||||||
game.SetActive(true);
|
game.transform.localPosition = Vector3.zero;
|
||||||
Destroy(unmannedAerialVehicle.gameObject);
|
game.transform.SetParent(null);
|
||||||
|
game.SetActive(true);
|
||||||
|
Destroy(unmannedAerialVehicle.gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -274,7 +278,7 @@ public class Microwaveweapon : MonoBehaviour
|
||||||
public IEnumerator Offlaserstrike()
|
public IEnumerator Offlaserstrike()
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return new WaitForSeconds(1.5f);
|
||||||
microblog.MicrowaveDisplay(0, 0f);
|
microblog.MicrowaveDisplay(0f, 0f);
|
||||||
ismicow = false;
|
ismicow = false;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -158,10 +158,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// 判断物体是否在相机里面
|
/// 判断物体是否在相机里面
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ispcamera;
|
public bool ispcamera;
|
||||||
/// <summary>
|
|
||||||
/// 激光武器攻击时间
|
|
||||||
/// </summary>
|
|
||||||
public static float timer;
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||||
|
@ -229,7 +226,6 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
StorageIntervalTime = weaponitemone[i].para_value;
|
StorageIntervalTime = weaponitemone[i].para_value;
|
||||||
lasertime = float.Parse(StorageIntervalTime);
|
lasertime = float.Parse(StorageIntervalTime);
|
||||||
storageIntervalTime = float.Parse(StorageIntervalTime);
|
storageIntervalTime = float.Parse(StorageIntervalTime);
|
||||||
timer = storageIntervalTime;
|
|
||||||
break;
|
break;
|
||||||
case "毁伤目标累积作用时间:":
|
case "毁伤目标累积作用时间:":
|
||||||
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
||||||
|
|
|
@ -224,11 +224,10 @@ public class RadarManger : MonoBehaviour
|
||||||
//Debug.Log("Timer fired at: " + Time.time);
|
//Debug.Log("Timer fired at: " + Time.time);
|
||||||
|
|
||||||
|
|
||||||
if (LaserFireControlPlatformManger.timer>0)
|
|
||||||
{
|
yield return new WaitForSeconds(5); // 等待一段时间后继续执行
|
||||||
yield return new WaitForSeconds(LaserFireControlPlatformManger.timer); // 等待一段时间后继续执行
|
RetrievalUAV();
|
||||||
RetrievalUAV();
|
|
||||||
}
|
|
||||||
//Deadzone();
|
//Deadzone();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -351,14 +350,14 @@ public class RadarManger : MonoBehaviour
|
||||||
continue;
|
continue;
|
||||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false && x.lasertime <= 0));
|
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);
|
Microwaveweapon microwaveweapon = Microwaveweapon.MicrowaveweaponList.Find(x => x != null && x.ismicow == false);
|
||||||
if (laserFireControlPlatformManger)
|
if (laserFireControlPlatformManger&& targets!=null)
|
||||||
{
|
{
|
||||||
laserFireControlPlatformManger.lasertime = laserFireControlPlatformManger.storageIntervalTime + 1.5f;
|
laserFireControlPlatformManger.lasertime = laserFireControlPlatformManger.storageIntervalTime + 1.5f;
|
||||||
laserFireControlPlatformManger.isLasing = true;
|
laserFireControlPlatformManger.isLasing = true;
|
||||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||||
laserFireControlPlatformManger.Lasing();
|
laserFireControlPlatformManger.Lasing();
|
||||||
}
|
}
|
||||||
else if (microwaveweapon)
|
else if (microwaveweapon&& targets!=null)
|
||||||
{
|
{
|
||||||
microwaveweapon.ismicow = true;
|
microwaveweapon.ismicow = true;
|
||||||
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
|
microwaveweapon.miceopos = unmannedAerialVehicle.transform;
|
||||||
|
|
|
@ -70,7 +70,10 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
/// 爆炸预制体
|
/// 爆炸预制体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject explodePrefab;
|
public GameObject explodePrefab;
|
||||||
|
/// <summary>
|
||||||
|
/// 重点目标爆炸预设体
|
||||||
|
/// </summary>
|
||||||
|
public GameObject explodePrefab1;
|
||||||
public TextMesh tips;
|
public TextMesh tips;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 攻击目标
|
/// 攻击目标
|
||||||
|
@ -125,7 +128,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
+ "编号" + serialNumber + "子无人机" + "自杀式攻击自爆了";
|
+ "编号" + serialNumber + "子无人机" + "自杀式攻击自爆了";
|
||||||
UploadLog(_log);
|
UploadLog(_log);
|
||||||
}
|
}
|
||||||
if (explodePrefab && transform)
|
if (explodePrefab /*&& transform*/)
|
||||||
{
|
{
|
||||||
GameObject Bao = Instantiate(explodePrefab, transform);
|
GameObject Bao = Instantiate(explodePrefab, transform);
|
||||||
Bao.transform.localPosition = Vector3.zero;
|
Bao.transform.localPosition = Vector3.zero;
|
||||||
|
@ -172,7 +175,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
highPriorityTarget.BeAssaulted(atkPos, true);
|
highPriorityTarget.BeAssaulted(atkPos, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject Bao = Instantiate(explodePrefab, _transform);
|
GameObject Bao = Instantiate(explodePrefab1, _transform);
|
||||||
Bao.transform.localPosition = Vector3.zero;
|
Bao.transform.localPosition = Vector3.zero;
|
||||||
Bao.transform.SetParent(null);
|
Bao.transform.SetParent(null);
|
||||||
Bao.SetActive(true);
|
Bao.SetActive(true);
|
||||||
|
|
Loading…
Reference in New Issue