This commit is contained in:
YangHua 2024-03-22 14:47:54 +08:00
parent fbd77a3c1a
commit c2e0f24726
2 changed files with 63 additions and 66 deletions

View File

@ -1626,8 +1626,6 @@ MonoBehaviour:
SurveillanceFrequencyBand: {fileID: 8129871292636694301} SurveillanceFrequencyBand: {fileID: 8129871292636694301}
flySpeedPlane: {fileID: 9020723963205404446} flySpeedPlane: {fileID: 9020723963205404446}
flySpeedSlider: {fileID: 608716198515631330} flySpeedSlider: {fileID: 608716198515631330}
gamePos: {fileID: 3441049289142467652}
gamemap: {fileID: 9017854076308260405}
reveal: 0 reveal: 0
Ground: Ground:
serializedVersion: 2 serializedVersion: 2
@ -2798,14 +2796,13 @@ 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 &9017854076308260405 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3}
m_PrefabInstance: {fileID: 638589549675547561}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5172610439169658982 stripped --- !u!4 &5172610439169658982 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de, m_CorrespondingSourceObject: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
@ -3067,6 +3064,11 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 16 value: 16
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!4 &1525602421726030359 stripped --- !u!4 &1525602421726030359 stripped
@ -3075,12 +3077,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 6501072882878902744} m_PrefabInstance: {fileID: 6501072882878902744}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &3441049289142467652 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3}
m_PrefabInstance: {fileID: 6501072882878902744}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6738463286047272674 --- !u!1001 &6738463286047272674
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3542,9 +3538,9 @@ PrefabInstance:
- {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} - {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
- {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} - {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
--- !u!114 &1189649587738053663 stripped --- !u!114 &7739009189435305960 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b, m_CorrespondingSourceObject: {fileID: 3955760755921223946, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3} type: 3}
m_PrefabInstance: {fileID: 6738463286047272674} m_PrefabInstance: {fileID: 6738463286047272674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
@ -3566,9 +3562,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!114 &805817557573538235 stripped --- !u!114 &6599785080451423720 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6245650889842523993, guid: 38fb1def99b2cd147a96842efe5a355b, m_CorrespondingSourceObject: {fileID: 438240288241169162, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3} type: 3}
m_PrefabInstance: {fileID: 6738463286047272674} m_PrefabInstance: {fileID: 6738463286047272674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
@ -3596,9 +3592,9 @@ GameObject:
type: 3} type: 3}
m_PrefabInstance: {fileID: 6738463286047272674} m_PrefabInstance: {fileID: 6738463286047272674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &6599785080451423720 stripped --- !u!114 &1189649587738053663 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 438240288241169162, guid: 38fb1def99b2cd147a96842efe5a355b, m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3} type: 3}
m_PrefabInstance: {fileID: 6738463286047272674} m_PrefabInstance: {fileID: 6738463286047272674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
@ -3632,9 +3628,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!114 &7739009189435305960 stripped --- !u!114 &805817557573538235 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3955760755921223946, guid: 38fb1def99b2cd147a96842efe5a355b, m_CorrespondingSourceObject: {fileID: 6245650889842523993, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3} type: 3}
m_PrefabInstance: {fileID: 6738463286047272674} m_PrefabInstance: {fileID: 6738463286047272674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
@ -4100,6 +4096,18 @@ PrefabInstance:
- {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} - {fileID: 5839716182141322363, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
- {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} - {fileID: 2022963561981901188, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 38fb1def99b2cd147a96842efe5a355b, type: 3}
--- !u!114 &3114167497287670592 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
m_PrefabInstance: {fileID: 7365093489755617725}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8959769708417747035 stripped --- !u!114 &8959769708417747035 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1900922108148937190, guid: 38fb1def99b2cd147a96842efe5a355b, m_CorrespondingSourceObject: {fileID: 1900922108148937190, guid: 38fb1def99b2cd147a96842efe5a355b,
@ -4190,15 +4198,3 @@ GameObject:
type: 3} type: 3}
m_PrefabInstance: {fileID: 7365093489755617725} m_PrefabInstance: {fileID: 7365093489755617725}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &3114167497287670592 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5548909004573041405, guid: 38fb1def99b2cd147a96842efe5a355b,
type: 3}
m_PrefabInstance: {fileID: 7365093489755617725}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -184,14 +184,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// </summary> /// </summary>
public ExtendedSlider flySpeedSlider; public ExtendedSlider flySpeedSlider;
/// <summary> ///// <summary>
/// 显示频谱地图上的位置 ///// 显示频谱地图上的位置
/// </summary> ///// </summary>
public GameObject gamePos; //public GameObject gamePos;
/// <summary> ///// <summary>
/// 显示在雷达上的位置 ///// 显示在雷达上的位置
/// </summary> ///// </summary>
public GameObject gamemap; //public GameObject gamemap;
/// <summary> /// <summary>
/// 频谱显示无人机大小 /// 频谱显示无人机大小
/// </summary> /// </summary>
@ -206,7 +206,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
public bool boisp = true; public bool boisp = true;
void Start() void Start()
{ {
gamePos.gameObject.SetActive(false); //gamePos.gameObject.SetActive(false);
MatrixFormation(30, 1); MatrixFormation(30, 1);
for (int i = 0; i < unmannedAerialVehicles.Count; i++) for (int i = 0; i < unmannedAerialVehicles.Count; i++)
{ {
@ -231,14 +231,14 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
flySpeedSlider.DragStop.AddListener(ChanagerFlySpeed); flySpeedSlider.DragStop.AddListener(ChanagerFlySpeed);
} }
private void Mapdisplay() //private void Mapdisplay()
{ //{
if (reveal > 1) // if (reveal > 1)
{ // {
gamePos.transform.localScale = new Vector3(reveal, 1, reveal); // gamePos.transform.localScale = new Vector3(reveal, 1, reveal);
boisp = false; // boisp = false;
} // }
} //}
/// <summary> /// <summary>
/// 设置组得标志 /// 设置组得标志
@ -277,7 +277,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
dataLinkCommunicationFrequency = change.transform.name; dataLinkCommunicationFrequency = change.transform.name;
int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency); int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency);
gamePos.layer = layerValue; //gamePos.layer = layerValue;
string nowData = GetSyncDataTwo(); string nowData = GetSyncDataTwo();
MyNetMQClient.instance.Send(nowData); MyNetMQClient.instance.Send(nowData);
equipmentCommon.SetDatabaseInfo("my_rate", dataLinkCommunicationFrequency); equipmentCommon.SetDatabaseInfo("my_rate", dataLinkCommunicationFrequency);
@ -325,7 +325,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
int layerValue = LayerMask.NameToLayer(_frequency); int layerValue = LayerMask.NameToLayer(_frequency);
dataLinkCommunicationFrequency = _frequency; dataLinkCommunicationFrequency = _frequency;
gamePos.layer = layerValue; //gamePos.layer = layerValue;
} }
/// <summary> /// <summary>
/// 接受同步消息 /// 接受同步消息
@ -348,10 +348,10 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
Rotation_Angle.transform.Rotate(Vector3.up*10*Time.deltaTime); Rotation_Angle.transform.Rotate(Vector3.up*10*Time.deltaTime);
} }
if (isStartRehearsing) //if (isStartRehearsing)
{ //{
gamePos.gameObject.SetActive(true); // //gamePos.gameObject.SetActive(true);
} //}
if (isStartRehearsing && equipmentCommon.isPlayer) if (isStartRehearsing && equipmentCommon.isPlayer)
{ {
switch (pattern) switch (pattern)
@ -395,23 +395,23 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
case 1: case 1:
reveal = 30; reveal = 30;
Mapdisplay(); //Mapdisplay();
break; break;
case 2: case 2:
reveal = 60; reveal = 60;
Mapdisplay(); //Mapdisplay();
break; break;
case 3: case 3:
reveal = 90; reveal = 90;
Mapdisplay(); //Mapdisplay();
break; break;
case 4: case 4:
reveal = 120; reveal = 120;
Mapdisplay(); //Mapdisplay();
break; break;
case 5: case 5:
reveal = 150; reveal = 150;
Mapdisplay(); //Mapdisplay();
break; break;
default: default:
break; break;
@ -509,6 +509,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
&& allColliders[i].transform.GetComponent<HighPriorityTarget>() && allColliders[i].transform.GetComponent<HighPriorityTarget>()
&& allColliders[i].transform.GetComponent<HighPriorityTarget>().frequency == electronicReconnaissanceCapability) && allColliders[i].transform.GetComponent<HighPriorityTarget>().frequency == electronicReconnaissanceCapability)
{ {
attackColliders1.Add(allColliders[i]); attackColliders1.Add(allColliders[i]);
} }
@ -698,8 +699,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
togFrequencyBands[k].gameObject.SetActive(date1.Contains(togFrequencyBands[k].transform.name)); togFrequencyBands[k].gameObject.SetActive(date1.Contains(togFrequencyBands[k].transform.name));
} }
dataLinkCommunicationFrequency = dates1[0]; dataLinkCommunicationFrequency = dates1[0];
int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency); //int layerValue = LayerMask.NameToLayer(dataLinkCommunicationFrequency);
gamePos.layer = layerValue; //gamePos.layer = layerValue;
foreach (Toggle toggle in togFrequencyBands) foreach (Toggle toggle in togFrequencyBands)
{ {
if (toggle.transform.name == dataLinkCommunicationFrequency) if (toggle.transform.name == dataLinkCommunicationFrequency)
@ -1162,7 +1163,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
if (isMove && positions.Count > 0) if (isMove && positions.Count > 0)
{ {
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);
@ -1180,7 +1181,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// <returns></returns> /// <returns></returns>
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);