32 lines
694 B
C#
32 lines
694 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 Start()
|
|
{
|
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
|
}
|
|
|
|
public void Pause()
|
|
{
|
|
wobbleReference.enabled = false;
|
|
isPaused = true;
|
|
}
|
|
|
|
public void DoResume()
|
|
{
|
|
wobbleReference.enabled = true;
|
|
isPaused = false;
|
|
}
|
|
|
|
public bool IsPaused => isPaused;
|
|
}
|
|
}
|