Add a pause menu, auto load via bootstrap and correctly show depending on the current scene

This commit is contained in:
Michal Pikulski
2025-09-25 12:02:18 +02:00
parent 74e65fdf42
commit 05753cc214
11 changed files with 3223 additions and 108 deletions

View File

@@ -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);