Add a pause menu, auto load via bootstrap and correctly show depending on the current scene
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@@ -81,7 +82,7 @@ namespace Input
|
||||
else
|
||||
{
|
||||
Debug.Log("[InputManager] SwitchInputOnSceneLoaded - Setting InputMode to PlayerTouch");
|
||||
SetInputMode(InputMode.Game);
|
||||
SetInputMode(InputMode.GameAndUI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +149,11 @@ namespace Input
|
||||
/// </summary>
|
||||
private void OnTapMovePerformed(InputAction.CallbackContext ctx)
|
||||
{
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 screenPos = positionAction.ReadValue<Vector2>();
|
||||
Vector3 worldPos = Camera.main.ScreenToWorldPoint(screenPos);
|
||||
Vector2 worldPos2D = new Vector2(worldPos.x, worldPos.y);
|
||||
|
||||
Reference in New Issue
Block a user