Files
AppleHillsProduction/Assets/Scripts/Minigames/DivingForPictures/Utilities/BottlePauser.cs
2025-10-16 23:19:33 +02:00

32 lines
697 B
C#

using AppleHills.Core.Interfaces;
using UnityEngine;
namespace Minigames.DivingForPictures.Utilities
{
public class BottlePauser : MonoBehaviour, IPausable
{
[SerializeField] private WobbleBehavior wobbleReference;
private bool isPaused = false;
private void OnEnable()
{
DivingGameManager.Instance.RegisterPausableComponent(this);
}
public void Pause()
{
wobbleReference.enabled = false;
isPaused = true;
}
public void DoResume()
{
wobbleReference.enabled = true;
isPaused = false;
}
public bool IsPaused => isPaused;
}
}