Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
1a8a7de718
|
@ -6,6 +6,7 @@ using UnityEngine;
|
|||
/// </summary>
|
||||
public class ElectronicReconnaissanceDrone : UAVBase
|
||||
{
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ public class ShellBoom : MonoBehaviour
|
|||
{
|
||||
public UnityEvent onShellAttack = new UnityEvent();
|
||||
public bool isPlayer = false;
|
||||
public Transform attackTarget;
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
Debug.Log(other.gameObject.name);
|
||||
|
@ -14,5 +15,13 @@ public class ShellBoom : MonoBehaviour
|
|||
{
|
||||
onShellAttack?.Invoke();
|
||||
}
|
||||
DestroyObject(gameObject, 8f);
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (attackTarget != null)
|
||||
{
|
||||
transform.Translate(transform.forward * Time.deltaTime * 70f, Space.World);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using PData;
|
||||
using AdamThinkDevicesData;
|
||||
using PData;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -8,6 +9,142 @@ using UnityEngine;
|
|||
/// </summary>
|
||||
public class UAVBase : MonoBehaviour
|
||||
{
|
||||
|
||||
public WRJModel wrjModel = WRJModel.无人机;
|
||||
|
||||
#region 无人机数据
|
||||
/// <summary>
|
||||
/// 续航时间
|
||||
/// </summary>
|
||||
public string batteryLife;
|
||||
/// <summary>
|
||||
/// 抗风等级
|
||||
/// </summary>
|
||||
public string classificationWindResistance;
|
||||
/// <summary>
|
||||
/// 最大飞行速度
|
||||
/// </summary>
|
||||
public string maximumFlyingSpeed;
|
||||
/// <summary>
|
||||
/// RCS
|
||||
/// </summary>
|
||||
public string RCS;
|
||||
/// <summary>
|
||||
/// 卫星定位频点
|
||||
/// </summary>
|
||||
public string satellitePositioningFrequency;
|
||||
/// <summary>
|
||||
/// 数据链通信频点
|
||||
/// </summary>
|
||||
public string dataLinkCommunicationFrequency;
|
||||
/// <summary>
|
||||
/// 电子侦察能力
|
||||
/// </summary>
|
||||
public string electronicReconnaissanceCapability;
|
||||
/// <summary>
|
||||
/// 光学侦察能力
|
||||
/// </summary>
|
||||
public string opticalReconnaissanceCapability;
|
||||
|
||||
#endregion
|
||||
public void SetAttribute(List<List_paraItem> weaponitemone)
|
||||
{
|
||||
for (int i = 0; i < weaponitemone.Count; i++)
|
||||
{
|
||||
switch (weaponitemone[i].para_name)
|
||||
{
|
||||
case "续航时间:":
|
||||
batteryLife = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "抗风等级:":
|
||||
classificationWindResistance = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "最大飞行速度:":
|
||||
maximumFlyingSpeed = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "RCS:":
|
||||
RCS = weaponitemone[i].para_value;
|
||||
break;
|
||||
case "卫星定位频点:":
|
||||
//satellitePositioningFrequency = weaponitemone[i].para_value;
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
satellitePositioningFrequency = "1227.60MHz";
|
||||
break;
|
||||
case "1":
|
||||
satellitePositioningFrequency = "1381.05MHz";
|
||||
break;
|
||||
case "2":
|
||||
satellitePositioningFrequency = "1575.42MHz";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "数据链通信频点:":
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
dataLinkCommunicationFrequency = "2GHz";
|
||||
break;
|
||||
case "1":
|
||||
dataLinkCommunicationFrequency = "4GHz";
|
||||
break;
|
||||
case "2":
|
||||
dataLinkCommunicationFrequency = "5GHz";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "电子侦察能力:":
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
electronicReconnaissanceCapability = "UHF";
|
||||
break;
|
||||
case "1":
|
||||
electronicReconnaissanceCapability = "L";
|
||||
break;
|
||||
case "2":
|
||||
electronicReconnaissanceCapability = "S";
|
||||
break;
|
||||
case "3":
|
||||
electronicReconnaissanceCapability = "C";
|
||||
break;
|
||||
case "4":
|
||||
electronicReconnaissanceCapability = "X";
|
||||
break;
|
||||
case "5":
|
||||
electronicReconnaissanceCapability = "Ku";
|
||||
break;
|
||||
case "6":
|
||||
electronicReconnaissanceCapability = "Ka";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "光学侦察能力:":
|
||||
//opticalReconnaissanceCapability = weaponitemone[i].para_value;
|
||||
switch (weaponitemone[i].para_value)
|
||||
{
|
||||
case "0":
|
||||
opticalReconnaissanceCapability = "有";
|
||||
break;
|
||||
case "1":
|
||||
opticalReconnaissanceCapability = "无";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void GetWeatherAttachUAV()
|
||||
{
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
/// </summary>
|
||||
public void Launchanattack()
|
||||
{
|
||||
if (targetPoint != null&& Receivingdistance>0)
|
||||
if (targetPoint != null && Receivingdistance > 0)
|
||||
{
|
||||
Vector3 pos = camera.WorldToViewportPoint(targetPoint.position);
|
||||
ispcamera = (pos.x > 0 && pos.x < 1 && pos.y > 0 && pos.y < 1 && pos.z > 0);
|
||||
|
@ -633,7 +633,8 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
Destroy(crosshair.gameObject);
|
||||
Destroy(InnerLaserlineRenderer.gameObject);
|
||||
Destroy(InnerLaserlineRenderer.gameObject);
|
||||
Destroy(OuterLaserlineRenderer.gameObject);
|
||||
if (OuterLaserlineRenderer != null)
|
||||
Destroy(OuterLaserlineRenderer.gameObject);
|
||||
OnActivationChanged -= OnActivationChangedHandler;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue