Fix unity warnings
This commit is contained in:
@@ -14,7 +14,7 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
private Camera _camera;
|
||||
|
||||
private BaseInteractableObject _selectedObject;
|
||||
|
||||
private bool _pressControl = false;
|
||||
|
||||
public InGameMouseHandler(Camera camera)
|
||||
{
|
||||
@@ -35,8 +35,9 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
|
||||
private void ClickToMove(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!EventSystem.current.IsPointerOverGameObject())
|
||||
if (_pressControl)
|
||||
{
|
||||
_pressControl = false;
|
||||
GameManager.Instance.UI.ClosePopupMenu();
|
||||
|
||||
if (_selectedObject != null)
|
||||
@@ -57,6 +58,9 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Mouse.current.leftButton.wasPressedThisFrame)
|
||||
_pressControl = !EventSystem.current.IsPointerOverGameObject(PointerInputModule.kMouseLeftId);
|
||||
|
||||
_ray = _camera.ScreenPointToRay(Mouse.current.position.ReadValue());
|
||||
if (Physics.Raycast(_ray, out var mouseRaycastHit, 100f, _selectableLayerMask))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user