Working pause menu re-worked with exlusive views

This commit is contained in:
Michal Pikulski
2025-10-24 10:41:27 +02:00
parent 7bb905eb6b
commit 1003c3f6ac
14 changed files with 878 additions and 116 deletions

View File

@@ -61,8 +61,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return; // Already paused
StopBubbleBehavior();
// Debug log for troubleshooting
@@ -74,8 +72,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
StartBubbleBehavior();
// Debug log for troubleshooting

View File

@@ -81,8 +81,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return; // Already paused
// Stop spawning coroutine
if (_spawnCoroutine != null)
{
@@ -108,8 +106,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
// Restart spawning coroutine
StartSpawningCoroutine();

View File

@@ -804,8 +804,6 @@ namespace Minigames.DivingForPictures
public void DoPause(bool turnOffGameInput = true)
{
if (GameManager.Instance.IsPaused) return; // Already paused
// Pause all registered components
foreach (var component in _pausableComponents)
{
@@ -824,8 +822,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
// Resume all registered components
foreach (var component in _pausableComponents)
{

View File

@@ -137,8 +137,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return; // Already paused
StopObstacleCoroutines();
Logging.Debug($"[FloatingObstacle] Paused obstacle: {name}");
@@ -149,8 +147,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
StartObstacleCoroutines();
Logging.Debug($"[FloatingObstacle] Resumed obstacle: {name}");

View File

@@ -121,8 +121,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return; // Already paused
// Stop spawning coroutine
if (_spawnCoroutine != null)
{
@@ -151,9 +149,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
// Restart spawning coroutine if not in surfacing mode
if (!_isSurfacing)
{

View File

@@ -286,8 +286,6 @@ namespace Minigames.DivingForPictures.Player
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return;
// If we're being paused, stop any active touch and tap impulse
_isTouchActive = false;
_tapImpulseStrength = 0f;
@@ -300,7 +298,6 @@ namespace Minigames.DivingForPictures.Player
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return;
Logging.Debug("[PlayerController] Resumed");
}
#endregion

View File

@@ -185,8 +185,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void Pause()
{
if (GameManager.Instance.IsPaused) return; // Already paused
// Stop all active coroutines but save their references
if (_movementCoroutine != null)
{
@@ -220,8 +218,6 @@ namespace Minigames.DivingForPictures
/// </summary>
public void DoResume()
{
if (!GameManager.Instance.IsPaused) return; // Already running
// Restart all necessary coroutines
StartMovementCoroutine();
StartTileDestructionCoroutine();