This commit is contained in:
yulong 2024-01-28 17:23:53 +08:00
parent eeb9868254
commit 85bcdb333b
3 changed files with 9 additions and 8 deletions

View File

@ -368,7 +368,7 @@ public class Spectrumdetection : MonoBehaviour
{
SpectrumdetectionUI.SetActive(true);
}
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
if (GlobalFlag.blueOrRed == 1)
{
EquipmentCommon equipmentCommon1 = GetComponent<EquipmentCommon>();
if (equipmentCommon.deviceID == equipmentCommon1.deviceID)

View File

@ -131,14 +131,14 @@ public class RadarManger : MonoBehaviour
}
void Start()
{
equipmentCommon = GetComponent<EquipmentCommon>();
// 订阅布尔值变化事件
OnActivationChanged += OnActivationChangedHandler;
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
}
#region
/// <summary>
/// 导条变化调用
@ -199,10 +199,10 @@ public class RadarManger : MonoBehaviour
void CreateRadarUI()
{
imageprs.transform.localScale = Vector3.zero;
aniRandarUI =imageprs.GetComponent<Animator>();
aniRandarUI = imageprs.GetComponent<Animator>();
RadarRotationSpeed(TurntableSpeed);
}
/// <summary>
/// 数据写入
/// </summary>
@ -324,8 +324,9 @@ public class RadarManger : MonoBehaviour
/// </summary>
private void OnMouseDown()
{
if (equipmentCommon.isPlayer)
if (equipmentCommon.isPlayer && GlobalFlag.blueOrRed == 1)
{
imageprs.gameObject.SetActive(true);
}
}

View File

@ -250,7 +250,7 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
/// <summary>
private void Detection()
{
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0" && Input.GetMouseButtonDown(0))
if (GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0))
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;