修改点击逻辑
This commit is contained in:
parent
8f97498f16
commit
6ad2acd75a
|
@ -102,6 +102,22 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hitInfo;
|
||||
if (Physics.Raycast(ray, out hitInfo, 1000))
|
||||
{
|
||||
if (hitInfo.collider.tag == "WRJ")
|
||||
{
|
||||
UnmannedAerialVehicleUI.Instance.unmannedAerialVehicleManage = hitInfo.collider.GetComponent<UnmannedAerialVehicleManage>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnOtherPlayerOnline(string msg)
|
||||
{
|
||||
StopCoroutine(WaitSpawn(msg));
|
||||
|
|
|
@ -143,18 +143,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hitInfo;
|
||||
if (Physics.Raycast(ray, out hitInfo, 1000))
|
||||
{
|
||||
if (hitInfo.collider.tag == "WRJ")
|
||||
{
|
||||
UnmannedAerialVehicleUI.Instance.unmannedAerialVehicleManage = transform.GetComponent<UnmannedAerialVehicleManage>();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isStartRehearsing && isStartRehearsing && pattern == Pattern.攻击)
|
||||
{
|
||||
if (airRoute)
|
||||
|
|
Loading…
Reference in New Issue