Compare commits

..

No commits in common. "373f859ec17b70e2636475abe676a44acec2affd" and "d07e9a6e370da89dfaeae2b931b6e504c7dba7a0" have entirely different histories.

5 changed files with 32 additions and 29 deletions

View File

@ -10021,7 +10021,6 @@ MonoBehaviour:
NumberOfProbes: 31
minCamera: {fileID: 1822639428928488196}
imageprs: {fileID: 8234605787508067104}
rawImage: {fileID: 2648302242586125239}
--- !u!54 &916690897
Rigidbody:
m_ObjectHideFlags: 0

View File

@ -736,7 +736,6 @@ MonoBehaviour:
toggle7: {fileID: 117463751223528660}
Frequency:
camera: {fileID: 480111845}
rawImage: {fileID: 1115657768}
--- !u!65 &1537869982341012852
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -88,18 +88,14 @@ public class Spectrumdetection : MonoBehaviour
/// 摄像机显示层数
/// </summary>
public Camera camera;
public RawImage rawImage;
void Start()
{
spectrumdetections.Add(this);
equipmentCommon = GetComponent<EquipmentCommon>();
// 订阅布尔值变化事件
OnActivationChanged += OnActivationChangedHandler;
_isStartRehearsing = GlobalFlag.isStartRehearsing;
Microwave();
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
}
private void Microwave()

View File

@ -123,22 +123,31 @@ public class RadarManger : MonoBehaviour
/// 激活面板预设体
/// </summary>
public Image imageprs;
public RawImage rawImage;
void Awake()
{
//minCamera = GameObject.Find("Minimap Camera").GetComponent<Camera>();
}
void Start()
{
equipmentCommon = GetComponent<EquipmentCommon>();
//aniRandar = imageprs.GetComponent<Animator>();
//if (RadarUi == null)
//{
// CreateRadarUI();
//}
// 订阅布尔值变化事件
OnActivationChanged += OnActivationChangedHandler;
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
//InvokeRepeating("RetrievalUAV", 1, 5);//测试用
}
// Update is called once per frame
void Update()
{
//if (equipmentCommon.isPlayer)
// RetrievalUAV();//看向无人机
}
#region
/// <summary>
/// 导条变化调用
@ -196,6 +205,22 @@ public class RadarManger : MonoBehaviour
}
#endregion
/// <summary>
/// 生成雷达UI
/// </summary>
//void CreateRadarUI()
//{
// Transform canvas = GameObject.Find("Canvas").transform;
// if (canvas)
// {
// GameObject _object = Instantiate(RadarUiPrefab, canvas);
// RadarUi = _object;
// RadarUi.transform.localScale = Vector3.zero;
// aniRandarUI = RadarUi.GetComponent<Animator>();
// RadarRotationSpeed(TurntableSpeed);
// }
//}
void CreateRadarUI()
{
imageprs.transform.localScale = Vector3.zero;

View File

@ -14,7 +14,6 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
/// WRJUI集合
/// </summary>
public static List<RadioAngleView> radioAngleViews = new List<RadioAngleView>();
/// <summary>
/// 所有无人机RenderTexture集合
/// </summary>
@ -114,21 +113,6 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
}
}
/// <summary>
///
/// </summary>
/// <param name="deviceID"></param>
/// <param name="camera"></param>
/// <param name="rawImage"></param>
public void CreateUI(string deviceID,Camera camera,RawImage rawImage)
{
RenderTexture renderTexture = new RenderTexture(500, 500, 0);
renderTexture.name = deviceID;
camera.targetTexture = renderTexture;
rawImage.texture = renderTexture;
renderTextures.Add(renderTexture);
}
/// <summary>
/// 删除无人机UI
/// </summary>