2025-10-10 14:31:51 +02:00
|
|
|
using AppleHills.Core.Interfaces;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Minigames.DivingForPictures.Utilities
|
|
|
|
|
{
|
|
|
|
|
public class RockPauser : MonoBehaviour, IPausable
|
|
|
|
|
{
|
|
|
|
|
[SerializeField] private RockFollower rockReference;
|
|
|
|
|
[SerializeField] private WobbleBehavior rockWobbleReference;
|
|
|
|
|
|
2025-10-17 13:18:33 +02:00
|
|
|
private void Start()
|
2025-10-10 14:31:51 +02:00
|
|
|
{
|
|
|
|
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Pause()
|
|
|
|
|
{
|
|
|
|
|
rockReference.enabled = false;
|
|
|
|
|
rockWobbleReference.enabled = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DoResume()
|
|
|
|
|
{
|
|
|
|
|
rockReference.enabled = true;
|
|
|
|
|
rockWobbleReference.enabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|