This commit is contained in:
parent
9c17e11cf8
commit
845a7ca740
|
@ -190,7 +190,7 @@ public class RadarManger : MonoBehaviour
|
|||
{
|
||||
if (equipmentCommon.isPlayer && timerCoroutine == null)
|
||||
{
|
||||
//timerCoroutine = StartCoroutine(Timer());
|
||||
timerCoroutine = StartCoroutine(Timer());
|
||||
isTimerRunning = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,44 +240,10 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
//Interferencemode();
|
||||
//Angularrange();
|
||||
}
|
||||
void LateUpdate()
|
||||
{
|
||||
Detection();
|
||||
|
||||
}
|
||||
|
||||
public GraphicRaycaster RaycastInCanvas;
|
||||
/// <summary>
|
||||
/// 点击无线电显示UI
|
||||
/// <summary>
|
||||
private void Detection()
|
||||
{
|
||||
if (GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0))
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(ray, out hit))
|
||||
{
|
||||
if (GlobalFlag.CheckGuiRaycastObjects(GameManager.Instance.eventsystem, RaycastInCanvas))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (hit.collider.GetComponent<EquipmentCommon>())
|
||||
{
|
||||
EquipmentCommon equipment = hit.collider.GetComponent<EquipmentCommon>();
|
||||
if (equipmentCommon.deviceID == equipment.deviceID)
|
||||
{
|
||||
Waveimage.transform.position = Camera.main.WorldToScreenPoint(hit.point);
|
||||
Waveimage.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 启动暂停
|
||||
|
@ -604,4 +570,13 @@ public class TerrestrialRadioInterferenceManger : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnMouseDwon()
|
||||
{
|
||||
if (GlobalFlag.blueOrRed == 1 && Input.GetMouseButtonDown(0))
|
||||
{
|
||||
Waveimage.transform.position = Camera.main.WorldToScreenPoint(transform.position);
|
||||
Waveimage.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue