Fix pausing etc. issues in the minigame
This commit is contained in:
@@ -168,14 +168,10 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
private void Start()
|
||||
{
|
||||
// Register with the DivingGameManager for pause/resume events
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
||||
|
||||
// If game is already initialized, initialize immediately
|
||||
@@ -189,7 +185,7 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user