This commit is contained in:
账号名 2024-01-29 17:43:02 +08:00
parent 2f341e93d8
commit 425d5a8ab3
8 changed files with 32 additions and 17 deletions

View File

@ -731,7 +731,7 @@ Camera:
width: 1 width: 1
height: 1 height: 1
near clip plane: 0.3 near clip plane: 0.3
far clip plane: 1000 far clip plane: 150
field of view: 60 field of view: 60
orthographic: 0 orthographic: 0
orthographic size: 5 orthographic size: 5

View File

@ -407,7 +407,7 @@ public class Spectrumdetection : MonoBehaviour
{ {
SpectrumdetectionUI.SetActive(true); SpectrumdetectionUI.SetActive(true);
} }
if (GlobalFlag.blueOrRed == 1) if (!GlobalFlag.isStartRehearsing && GlobalFlag.blueOrRed == 1)
{ {
EquipmentCommon equipmentCommon1 = GetComponent<EquipmentCommon>(); EquipmentCommon equipmentCommon1 = GetComponent<EquipmentCommon>();
if (equipmentCommon.deviceID == equipmentCommon1.deviceID) if (equipmentCommon.deviceID == equipmentCommon1.deviceID)

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1113159741} 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 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -51042,6 +51042,15 @@ MonoBehaviour:
posture: {fileID: 1719983405} posture: {fileID: 1719983405}
wrjCount: 0 wrjCount: 0
players: [] players: []
RedLayer:
serializedVersion: 2
m_Bits: 28471
BlueLayer:
serializedVersion: 2
m_Bits: 30519
TeacherLayer:
serializedVersion: 2
m_Bits: 32567
wrjDrags: wrjDrags:
- {fileID: 609129006} - {fileID: 609129006}
- {fileID: 745447508} - {fileID: 745447508}
@ -65956,7 +65965,7 @@ MonoBehaviour:
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
randSeed: 18155593 randSeed: 31106328
isDoingTransition: 0 isDoingTransition: 0
minimumHeight: 0 minimumHeight: 0
--- !u!114 &1820978574 --- !u!114 &1820978574

View File

@ -34,6 +34,9 @@ public class GameManager : MonoSingleton<GameManager>
public int wrjCount; public int wrjCount;
public List<SyncPlayerTransform> players = new List<SyncPlayerTransform>(); public List<SyncPlayerTransform> players = new List<SyncPlayerTransform>();
public LayerMask RedLayer;
public LayerMask BlueLayer;
public LayerMask TeacherLayer;
public DragController[] wrjDrags; public DragController[] wrjDrags;
@ -79,7 +82,8 @@ public class GameManager : MonoSingleton<GameManager>
spt.transform.position = redSpawnPos.position; spt.transform.position = redSpawnPos.position;
spt.transform.eulerAngles = redSpawnPos.eulerAngles; spt.transform.eulerAngles = redSpawnPos.eulerAngles;
spt.gameObject.SetActive(true); spt.gameObject.SetActive(true);
spt.GetComponent<Camera>().cullingMask = ~(1 << 12) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); //spt.GetComponent<Camera>().cullingMask = ~(1 << 12) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22);
spt.GetComponent<Camera>().cullingMask = RedLayer;
//spt.GetComponent<Camera>().cullingMask = ~(1 << 15); //spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机"); AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机");
if (diTemp.device_count > 0) if (diTemp.device_count > 0)
@ -109,7 +113,8 @@ public class GameManager : MonoSingleton<GameManager>
spt.transform.position = blueSpawnPos.position; spt.transform.position = blueSpawnPos.position;
spt.transform.eulerAngles = blueSpawnPos.eulerAngles; spt.transform.eulerAngles = blueSpawnPos.eulerAngles;
spt.gameObject.SetActive(true); spt.gameObject.SetActive(true);
spt.GetComponent<Camera>().cullingMask = ~(1 << 11) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22); //spt.GetComponent<Camera>().cullingMask = ~(1 << 11) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22);
spt.GetComponent<Camera>().cullingMask = BlueLayer;
if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0) if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0)
{ {
for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count; i++) for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count; i++)
@ -165,7 +170,7 @@ public class GameManager : MonoSingleton<GameManager>
Debug.Log($"<color=red>isStartRehearsing={ GlobalFlag.isStartRehearsing}</color>"); Debug.Log($"<color=red>isStartRehearsing={ GlobalFlag.isStartRehearsing}</color>");
if (GlobalFlag.isStartRehearsing) if (GlobalFlag.isStartRehearsing)
{ {
spt.GetComponent<Camera>().cullingMask = -1; spt.GetComponent<Camera>().cullingMask = TeacherLayer;
} }
} }
if (GlobalFlag.currentUser.role_code == "03") if (GlobalFlag.currentUser.role_code == "03")
@ -173,16 +178,16 @@ public class GameManager : MonoSingleton<GameManager>
GlobalFlag.blueOrRed = 3; GlobalFlag.blueOrRed = 3;
Teacher.gameObject.SetActive(true); Teacher.gameObject.SetActive(true);
student.gameObject.SetActive(false); student.gameObject.SetActive(false);
spt.GetComponent<Camera>().cullingMask = -1; spt.GetComponent<Camera>().cullingMask = TeacherLayer;
} }
if (GlobalFlag.currentUser.role_code == "02") if (GlobalFlag.currentUser.role_code == "02")
{ {
Teacher.gameObject.SetActive(false); Teacher.gameObject.SetActive(false);
student.gameObject.SetActive(false); student.gameObject.SetActive(false);
posture.gameObject.SetActive(true); posture.gameObject.SetActive(true);
spt.GetComponent<Camera>().cullingMask = -1; spt.GetComponent<Camera>().cullingMask = TeacherLayer;
} }
spt.GetComponent<Camera>().cullingMask &= ~(1 << 15); //spt.GetComponent<Camera>().cullingMask &= ~(1 << 15);
tenkokuModule.mainCamera = spt.transform; tenkokuModule.mainCamera = spt.transform;
AddPlayers(spt); AddPlayers(spt);
@ -387,8 +392,8 @@ public class GameManager : MonoSingleton<GameManager>
} }
if (GlobalFlag.currentUser.role_code == "04") if (GlobalFlag.currentUser.role_code == "04")
{ {
currentSpt.GetComponent<Camera>().cullingMask = -1; currentSpt.GetComponent<Camera>().cullingMask = TeacherLayer;
currentSpt.GetComponent<Camera>().cullingMask &= ~(1 << 15); //currentSpt.GetComponent<Camera>().cullingMask &= ~(1 << 15);
} }
} }
} }

View File

@ -187,7 +187,7 @@ public class HighPriorityTarget : MonoBehaviour
if (Physics.Raycast(ray, out hit, 1000)) if (Physics.Raycast(ray, out hit, 1000))
{ {
HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>(); HighPriorityTarget highPriorityTarget = hit.transform.GetComponent<HighPriorityTarget>();
if (highPriorityTarget && highPriorityTarget.Number == Number) if (!GlobalFlag.isStartRehearsing && highPriorityTarget && highPriorityTarget.Number == Number)
{ {
regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point); regulate.transform.position = Camera.main.WorldToScreenPoint(hit.point);
regulate.gameObject.SetActive(true); regulate.gameObject.SetActive(true);

View File

@ -573,7 +573,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
void OnMouseDown() 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.transform.position = Camera.main.WorldToScreenPoint(transform.position);
Waveimage.gameObject.SetActive(true); Waveimage.gameObject.SetActive(true);

View File

@ -972,6 +972,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
distanceMeasurement.isPathCanBePlanned = true; distanceMeasurement.isPathCanBePlanned = true;
positions.Clear(); positions.Clear();
positions.Enqueue(startPos.transform.position);
} }
} }
else else

View File

@ -70,7 +70,7 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
{ {
radioAngleView.transform.SetAsFirstSibling(); // 移到父物体的第一个位置 radioAngleView.transform.SetAsFirstSibling(); // 移到父物体的第一个位置
radioAngleView.transform.localScale = Vector3.one; radioAngleView.transform.localScale = Vector3.one;
textNmme.text = name; textNmme.text = unmannedAerialVehicleManage.transform.name;
rawShow.texture = unmannedAerialVehicleManage.wrjModel == WRJModel. ? rawShow.texture = unmannedAerialVehicleManage.wrjModel == WRJModel. ?
unmannedAerialVehicleManage.dzWRJCamera.targetTexture : unmannedAerialVehicleManage.gxWRJCamera.targetTexture; unmannedAerialVehicleManage.dzWRJCamera.targetTexture : unmannedAerialVehicleManage.gxWRJCamera.targetTexture;
@ -81,13 +81,13 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
{ {
GameObject wrj = Instantiate(prefabRadioAngleView, uiParent); GameObject wrj = Instantiate(prefabRadioAngleView, uiParent);
wrj.transform.localScale = Vector3.zero; wrj.transform.localScale = Vector3.zero;
wrj.name = name; wrj.name = unmannedAerialVehicleManage.transform.name;
wrj.transform.SetAsLastSibling();// 移到父物体的最后一个位置 wrj.transform.SetAsLastSibling();// 移到父物体的最后一个位置
RadioAngleView radioAngleViewMain = wrj.GetComponent<RadioAngleView>(); RadioAngleView radioAngleViewMain = wrj.GetComponent<RadioAngleView>();
if (radioAngleViewMain) if (radioAngleViewMain)
{ {
radioAngleViewMain.deviceID = unmannedAerialVehicleManage.equipmentCommon.deviceID; radioAngleViewMain.deviceID = unmannedAerialVehicleManage.equipmentCommon.deviceID;
radioAngleViewMain.textNmme.text = name; radioAngleViewMain.textNmme.text = unmannedAerialVehicleManage.transform.name;
radioAngleViewMain.typeWRJ= unmannedAerialVehicleManage.wrjModel; radioAngleViewMain.typeWRJ= unmannedAerialVehicleManage.wrjModel;
Mask mask = wrj.transform.GetComponentInChildren<Mask>(); Mask mask = wrj.transform.GetComponentInChildren<Mask>();
if (mask) if (mask)