Revamp game pausing and input handling. Fix minigame tutorial and end sequence. (#39)

- Revamp pausing and centralize management in GameManager
- Switch Pause implementation to be counter-based to solve corner case of multiple pause requests
- Remove duplicated Pause logic from other components
- Add pausing when browsing the card album
- Fully deliver the exclusive UI implementation
- Spruce up the MiniGame tutorial with correct pausing, hiding other UI
- Correctly unpause after showing tutorial
- Fix minigame ending sequence. The cinematic correctly plays only once now
- Replaying the minigame works

Co-authored-by: Michal Adam Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #39
This commit is contained in:
2025-10-24 11:09:32 +00:00
parent 35acaddca5
commit 5a85a602bd
26 changed files with 1342 additions and 1023 deletions

View File

@@ -8,8 +8,6 @@ namespace Minigames.DivingForPictures.Utilities
[SerializeField] private RockFollower rockReference;
[SerializeField] private WobbleBehavior rockWobbleReference;
private bool isPaused = false;
private void Start()
{
DivingGameManager.Instance.RegisterPausableComponent(this);
@@ -19,16 +17,12 @@ namespace Minigames.DivingForPictures.Utilities
{
rockReference.enabled = false;
rockWobbleReference.enabled = false;
isPaused = true;
}
public void DoResume()
{
rockReference.enabled = true;
rockWobbleReference.enabled = true;
isPaused = false;
}
public bool IsPaused => isPaused;
}
}