Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
3546300af1
Assets
GameAssets
Zion/Scripts/ModelFunction
|
@ -10024,6 +10024,11 @@ MonoBehaviour:
|
||||||
imageprs: {fileID: 8234605787508067104}
|
imageprs: {fileID: 8234605787508067104}
|
||||||
rawImage: {fileID: 2648302242586125239}
|
rawImage: {fileID: 2648302242586125239}
|
||||||
Mapsize: 0
|
Mapsize: 0
|
||||||
|
radarCenter: {fileID: 0}
|
||||||
|
targets: []
|
||||||
|
radarBackground: {fileID: 0}
|
||||||
|
targetPointPrefab: {fileID: 206342759773512327, guid: 91611532a57ff5640a422ee5073cdc5f,
|
||||||
|
type: 3}
|
||||||
colliders: []
|
colliders: []
|
||||||
attackColliders1: []
|
attackColliders1: []
|
||||||
--- !u!54 &916690897
|
--- !u!54 &916690897
|
||||||
|
|
|
@ -1800,6 +1800,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 15
|
value: 15
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 91b685a7f0a6f7643b8ae61842f883de, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 91b685a7f0a6f7643b8ae61842f883de, type: 3}
|
||||||
--- !u!1 &6311100753636855780 stripped
|
--- !u!1 &6311100753636855780 stripped
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &206342759773512327
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2688497756288788902}
|
||||||
|
- component: {fileID: 7290575562297055200}
|
||||||
|
- component: {fileID: 1764915735450254642}
|
||||||
|
m_Layer: 12
|
||||||
|
m_Name: WRJPoint
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2688497756288788902
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 206342759773512327}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 29.26, y: 4.95}
|
||||||
|
m_SizeDelta: {x: 9.895126, y: 9.895126}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7290575562297055200
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 206342759773512327}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &1764915735450254642
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 206342759773512327}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.08717966, g: 0, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 91611532a57ff5640a422ee5073cdc5f
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -144,6 +144,7 @@ public class RadarManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
//失活摄像机
|
//失活摄像机
|
||||||
minCamera.gameObject.SetActive(false);
|
minCamera.gameObject.SetActive(false);
|
||||||
|
radarCenter = this.transform;
|
||||||
}
|
}
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
@ -154,24 +155,43 @@ public class RadarManger : MonoBehaviour
|
||||||
OnActivationChanged += OnActivationChangedHandler;
|
OnActivationChanged += OnActivationChangedHandler;
|
||||||
//DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
//DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||||
}
|
}
|
||||||
|
public Transform radarCenter;
|
||||||
|
public List<GameObject> targets = new List<GameObject>();
|
||||||
|
public Image radarBackground;
|
||||||
|
public GameObject targetPointPrefab;
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
//老师点了开始演习就激活摄像机
|
//老师点了开始演习就激活摄像机
|
||||||
if (isStartRehearsing)
|
if (isStartRehearsing)
|
||||||
{
|
{
|
||||||
minCamera.gameObject.SetActive(true);
|
minCamera.gameObject.SetActive(true);
|
||||||
}
|
targets = GameObject.FindGameObjectsWithTag("WRJ").ToList().FindAll(a => a.GetComponent<UnmannedAerialVehicleManage>().GetRCS() > float.Parse(RCS));
|
||||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
|
||||||
|
foreach (Transform child in rawImage.transform)
|
||||||
{
|
{
|
||||||
onlyOne = false;
|
Destroy(child.gameObject);
|
||||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (GameObject target in targets)
|
||||||
|
{
|
||||||
|
Vector3 relativePosition = target.transform.position - radarCenter.position;
|
||||||
|
Vector2 radarPosition = new Vector2(relativePosition.x, relativePosition.z) * 0.1f;
|
||||||
|
GameObject point = Instantiate(targetPointPrefab, rawImage.transform);
|
||||||
|
RectTransform rt = point.GetComponent<RectTransform>();
|
||||||
|
rt.anchoredPosition = radarPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||||
|
//{
|
||||||
|
// onlyOne = false;
|
||||||
|
// DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||||
|
//}
|
||||||
Deadzone();//雷达盲区
|
Deadzone();//雷达盲区
|
||||||
if (Mapsize >1)
|
//if (Mapsize >1)
|
||||||
{
|
//{
|
||||||
Dotsize();//改变雷达地图上显示无人机大小
|
// Dotsize();//改变雷达地图上显示无人机大小
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Dotsize()
|
private void Dotsize()
|
||||||
|
|
|
@ -162,6 +162,11 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
public string opticalReconnaissanceCapability;
|
public string opticalReconnaissanceCapability;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
public float GetRCS()
|
||||||
|
{
|
||||||
|
return float.Parse(RCS);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 频段设置面板
|
/// 频段设置面板
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -752,7 +757,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
FireSpeed = 0;
|
FireSpeed = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckRSC();
|
//CheckRSC();
|
||||||
if (i == (weaponitemone.Count - 1))
|
if (i == (weaponitemone.Count - 1))
|
||||||
{
|
{
|
||||||
StartCoroutine(WeaponitemoneDataAddition());
|
StartCoroutine(WeaponitemoneDataAddition());
|
||||||
|
@ -1158,7 +1163,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
{
|
{
|
||||||
isMove = false;
|
isMove = false;
|
||||||
gamePos.gameObject.SetActive(true);
|
gamePos.gameObject.SetActive(true);
|
||||||
gamemap.gameObject.SetActive(true);
|
//gamemap.gameObject.SetActive(true);
|
||||||
Vector3 _positions = positions.Dequeue();
|
Vector3 _positions = positions.Dequeue();
|
||||||
var nowData = GetSyncData(_positions);
|
var nowData = GetSyncData(_positions);
|
||||||
MyNetMQClient.instance.Send(nowData);
|
MyNetMQClient.instance.Send(nowData);
|
||||||
|
@ -1176,7 +1181,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
public IEnumerator MoveObjectAlongPath(Vector3 _positions) // 协程:按路线移动物体
|
public IEnumerator MoveObjectAlongPath(Vector3 _positions) // 协程:按路线移动物体
|
||||||
{
|
{
|
||||||
gamePos.gameObject.SetActive(true);
|
gamePos.gameObject.SetActive(true);
|
||||||
gamemap.gameObject.SetActive(true);
|
//gamemap.gameObject.SetActive(true);
|
||||||
Vector3 targetPosition = new Vector3(_positions.x, hight, _positions.z);// 目标位置为当前顶点坐标
|
Vector3 targetPosition = new Vector3(_positions.x, hight, _positions.z);// 目标位置为当前顶点坐标
|
||||||
float _distance = Vector3.Distance(transform.position, targetPosition);
|
float _distance = Vector3.Distance(transform.position, targetPosition);
|
||||||
float _time = _distance / FireSpeed;
|
float _time = _distance / FireSpeed;
|
||||||
|
|
Loading…
Reference in New Issue