Update the Pause menu flow to be slightly less scoffed

This commit is contained in:
Michal Pikulski
2025-10-16 23:19:33 +02:00
parent 09ae4b5ba7
commit b2384269e5
11 changed files with 167 additions and 92 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
@@ -8,6 +9,7 @@ using AppleHills.Core.Settings;
using Utils;
using AppleHills.Core.Interfaces;
using Core;
using Random = UnityEngine.Random;
namespace Minigames.DivingForPictures
{
@@ -166,13 +168,16 @@ namespace Minigames.DivingForPictures
}
}
private void OnEnable()
{
// Register with the DivingGameManager for pause/resume events
DivingGameManager.Instance.RegisterPausableComponent(this);
}
private void Start()
{
DivingGameManager.Instance.OnGameInitialized += Initialize;
// Register with the DivingGameManager for pause/resume events
DivingGameManager.Instance.RegisterPausableComponent(this);
// If game is already initialized, initialize immediately
if (DivingGameManager.Instance.GetType().GetField("_isGameInitialized",
System.Reflection.BindingFlags.NonPublic |