- 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
26 lines
552 B
C#
26 lines
552 B
C#
using AppleHills.Core.Interfaces;
|
|
using UnityEngine;
|
|
|
|
namespace Minigames.DivingForPictures.Utilities
|
|
{
|
|
public class BottlePauser : MonoBehaviour, IPausable
|
|
{
|
|
[SerializeField] private WobbleBehavior wobbleReference;
|
|
|
|
private void Start()
|
|
{
|
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
|
}
|
|
|
|
public void Pause()
|
|
{
|
|
wobbleReference.enabled = false;
|
|
}
|
|
|
|
public void DoResume()
|
|
{
|
|
wobbleReference.enabled = true;
|
|
}
|
|
}
|
|
}
|