From 425d5a8ab3926dc04714ba06834c445b85f94e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=90=8D?= <3077614386@qq.com> Date: Mon, 29 Jan 2024 17:43:02 +0800 Subject: [PATCH] 1 --- .../Prefebs/Models/moder/无人机List.prefab | 2 +- Assets/Temp/Scripts/Spectrumdetection.cs | 2 +- .../AdamTraining_pilot_terminal_panl 1.unity | 13 ++++++++++-- Assets/Zion/Scripts/Adam/GameManager.cs | 21 ++++++++++++------- Assets/Zion/Scripts/HighPriorityTarget.cs | 2 +- .../TerrestrialRadioInterferenceManger.cs | 2 +- .../UAV/UnmannedAerialVehicleManage.cs | 1 + .../Zion/Scripts/WRJ0125/DroneViewDisplay.cs | 6 +++--- 8 files changed, 32 insertions(+), 17 deletions(-) diff --git a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab index ceef5f03..51f08031 100644 --- a/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab +++ b/Assets/GameAssets/Prefebs/Models/moder/无人机List.prefab @@ -731,7 +731,7 @@ Camera: width: 1 height: 1 near clip plane: 0.3 - far clip plane: 1000 + far clip plane: 150 field of view: 60 orthographic: 0 orthographic size: 5 diff --git a/Assets/Temp/Scripts/Spectrumdetection.cs b/Assets/Temp/Scripts/Spectrumdetection.cs index 2fb40066..8938c5e9 100644 --- a/Assets/Temp/Scripts/Spectrumdetection.cs +++ b/Assets/Temp/Scripts/Spectrumdetection.cs @@ -407,7 +407,7 @@ public class Spectrumdetection : MonoBehaviour { SpectrumdetectionUI.SetActive(true); } - if (GlobalFlag.blueOrRed == 1) + if (!GlobalFlag.isStartRehearsing && GlobalFlag.blueOrRed == 1) { EquipmentCommon equipmentCommon1 = GetComponent(); if (equipmentCommon.deviceID == equipmentCommon1.deviceID) diff --git a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity index b5ef10eb..169d7758 100644 --- a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity +++ b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1113159741} - m_IndirectSpecularColor: {r: 0.1622918, g: 0.30613187, b: 0.6693923, a: 1} + m_IndirectSpecularColor: {r: 0.16213277, g: 0.30592287, b: 0.66935045, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -51042,6 +51042,15 @@ MonoBehaviour: posture: {fileID: 1719983405} wrjCount: 0 players: [] + RedLayer: + serializedVersion: 2 + m_Bits: 28471 + BlueLayer: + serializedVersion: 2 + m_Bits: 30519 + TeacherLayer: + serializedVersion: 2 + m_Bits: 32567 wrjDrags: - {fileID: 609129006} - {fileID: 745447508} @@ -65956,7 +65965,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - randSeed: 18155593 + randSeed: 31106328 isDoingTransition: 0 minimumHeight: 0 --- !u!114 &1820978574 diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index 9efe8b71..7311061e 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -34,6 +34,9 @@ public class GameManager : MonoSingleton public int wrjCount; public List players = new List(); + public LayerMask RedLayer; + public LayerMask BlueLayer; + public LayerMask TeacherLayer; public DragController[] wrjDrags; @@ -79,7 +82,8 @@ public class GameManager : MonoSingleton spt.transform.position = redSpawnPos.position; spt.transform.eulerAngles = redSpawnPos.eulerAngles; spt.gameObject.SetActive(true); - spt.GetComponent().cullingMask = ~(1 << 12) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); + //spt.GetComponent().cullingMask = ~(1 << 12) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); + spt.GetComponent().cullingMask = RedLayer; //spt.GetComponent().cullingMask = ~(1 << 15); AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机"); if (diTemp.device_count > 0) @@ -109,7 +113,8 @@ public class GameManager : MonoSingleton spt.transform.position = blueSpawnPos.position; spt.transform.eulerAngles = blueSpawnPos.eulerAngles; spt.gameObject.SetActive(true); - spt.GetComponent().cullingMask = ~(1 << 11) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); + //spt.GetComponent().cullingMask = ~(1 << 11) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); + spt.GetComponent().cullingMask = BlueLayer; if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0) { for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count; i++) @@ -165,7 +170,7 @@ public class GameManager : MonoSingleton Debug.Log($"isStartRehearsing={ GlobalFlag.isStartRehearsing}"); if (GlobalFlag.isStartRehearsing) { - spt.GetComponent().cullingMask = -1; + spt.GetComponent().cullingMask = TeacherLayer; } } if (GlobalFlag.currentUser.role_code == "03") @@ -173,16 +178,16 @@ public class GameManager : MonoSingleton GlobalFlag.blueOrRed = 3; Teacher.gameObject.SetActive(true); student.gameObject.SetActive(false); - spt.GetComponent().cullingMask = -1; + spt.GetComponent().cullingMask = TeacherLayer; } if (GlobalFlag.currentUser.role_code == "02") { Teacher.gameObject.SetActive(false); student.gameObject.SetActive(false); posture.gameObject.SetActive(true); - spt.GetComponent().cullingMask = -1; + spt.GetComponent().cullingMask = TeacherLayer; } - spt.GetComponent().cullingMask &= ~(1 << 15); + //spt.GetComponent().cullingMask &= ~(1 << 15); tenkokuModule.mainCamera = spt.transform; AddPlayers(spt); @@ -387,8 +392,8 @@ public class GameManager : MonoSingleton } if (GlobalFlag.currentUser.role_code == "04") { - currentSpt.GetComponent().cullingMask = -1; - currentSpt.GetComponent().cullingMask &= ~(1 << 15); + currentSpt.GetComponent().cullingMask = TeacherLayer; + //currentSpt.GetComponent().cullingMask &= ~(1 << 15); } } } diff --git a/Assets/Zion/Scripts/HighPriorityTarget.cs b/Assets/Zion/Scripts/HighPriorityTarget.cs index 838f8b56..550b7c49 100644 --- a/Assets/Zion/Scripts/HighPriorityTarget.cs +++ b/Assets/Zion/Scripts/HighPriorityTarget.cs @@ -187,7 +187,7 @@ public class HighPriorityTarget : MonoBehaviour if (Physics.Raycast(ray, out hit, 1000)) { HighPriorityTarget highPriorityTarget = hit.transform.GetComponent(); - if (highPriorityTarget && highPriorityTarget.Number == Number) + if (!GlobalFlag.isStartRehearsing && highPriorityTarget && highPriorityTarget.Number == Number) { regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point); regulate.gameObject.SetActive(true); diff --git a/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs b/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs index cd0d03c7..845c7ffc 100644 --- a/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs +++ b/Assets/Zion/Scripts/ModelFunction/TerrestrialRadioInterference/TerrestrialRadioInterferenceManger.cs @@ -573,7 +573,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour void OnMouseDown() { - if (GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0)) + if (!GlobalFlag.isStartRehearsing && GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0)) { Waveimage.transform.position = Camera.main.WorldToScreenPoint(transform.position); Waveimage.gameObject.SetActive(true); diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index bf5b3275..f6dbcea2 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -972,6 +972,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour { distanceMeasurement.isPathCanBePlanned = true; positions.Clear(); + positions.Enqueue(startPos.transform.position); } } else diff --git a/Assets/Zion/Scripts/WRJ0125/DroneViewDisplay.cs b/Assets/Zion/Scripts/WRJ0125/DroneViewDisplay.cs index 7b068768..0ae590d9 100644 --- a/Assets/Zion/Scripts/WRJ0125/DroneViewDisplay.cs +++ b/Assets/Zion/Scripts/WRJ0125/DroneViewDisplay.cs @@ -70,7 +70,7 @@ public class DroneViewDisplay : MonoSingleton { radioAngleView.transform.SetAsFirstSibling(); // 移到父物体的第一个位置 radioAngleView.transform.localScale = Vector3.one; - textNmme.text = name; + textNmme.text = unmannedAerialVehicleManage.transform.name; rawShow.texture = unmannedAerialVehicleManage.wrjModel == WRJModel.电子侦察无人机 ? unmannedAerialVehicleManage.dzWRJCamera.targetTexture : unmannedAerialVehicleManage.gxWRJCamera.targetTexture; @@ -81,13 +81,13 @@ public class DroneViewDisplay : MonoSingleton { GameObject wrj = Instantiate(prefabRadioAngleView, uiParent); wrj.transform.localScale = Vector3.zero; - wrj.name = name; + wrj.name = unmannedAerialVehicleManage.transform.name; wrj.transform.SetAsLastSibling();// 移到父物体的最后一个位置 RadioAngleView radioAngleViewMain = wrj.GetComponent(); if (radioAngleViewMain) { radioAngleViewMain.deviceID = unmannedAerialVehicleManage.equipmentCommon.deviceID; - radioAngleViewMain.textNmme.text = name; + radioAngleViewMain.textNmme.text = unmannedAerialVehicleManage.transform.name; radioAngleViewMain.typeWRJ= unmannedAerialVehicleManage.wrjModel; Mask mask = wrj.transform.GetComponentInChildren(); if (mask)