This commit is contained in:
parent
85b2e78159
commit
a7f29ce501
|
@ -11063,7 +11063,7 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
- m_Target: {fileID: 8090299037542606275}
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
|
@ -13615,7 +13615,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5575961237249078487}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
|
|
|
@ -550,7 +550,7 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 5136179047312290042}
|
||||
- m_Target: {fileID: 4504370092153585706}
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
|
|
|
@ -314,7 +314,7 @@ public class Spectrumdetection : MonoBehaviour
|
|||
void Update()
|
||||
{
|
||||
Search();//微波武器朝向无人机
|
||||
Emittedray();
|
||||
//Emittedray();
|
||||
}
|
||||
/// <summary>
|
||||
/// 点击物体生成页面
|
||||
|
@ -322,27 +322,7 @@ public class Spectrumdetection : MonoBehaviour
|
|||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void Emittedray()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0) && UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Physics.Raycast(ray, out hit, 1000))
|
||||
{
|
||||
if (hit.collider.GetComponent<EquipmentCommon>())
|
||||
{
|
||||
EquipmentCommon equipmentCommon1 = hit.collider.GetComponent<EquipmentCommon>();
|
||||
if (equipmentCommon.deviceID == equipmentCommon1.deviceID)
|
||||
{
|
||||
Frequencyiamge.transform.position = Camera.main.WorldToScreenPoint(hit.point);
|
||||
Frequencyiamge.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -382,6 +362,15 @@ public class Spectrumdetection : MonoBehaviour
|
|||
{
|
||||
SpectrumdetectionUI.SetActive(true);
|
||||
}
|
||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
|
||||
{
|
||||
EquipmentCommon equipmentCommon1 = GetComponent<EquipmentCommon>();
|
||||
if (equipmentCommon.deviceID == equipmentCommon1.deviceID)
|
||||
{
|
||||
Frequencyiamge.transform.position = Camera.main.WorldToScreenPoint(transform.position);
|
||||
Frequencyiamge.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
//SpectrumdetectionUI.SetActive(true);
|
||||
}
|
||||
private void OnDestroy()
|
||||
|
|
Loading…
Reference in New Issue