Fix pausing etc. issues in the minigame
This commit is contained in:
@@ -98,24 +98,10 @@ namespace Minigames.DivingForPictures
|
||||
public event Action<Monster, float> OnPhotoSequenceCompleted; // Now includes proximity score
|
||||
public event Action<float> OnPhotoSequenceProgressUpdated;
|
||||
|
||||
private static DivingGameManager _instance;
|
||||
private static DivingGameManager _instance = null;
|
||||
private static bool _isQuitting = false;
|
||||
public static DivingGameManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<DivingGameManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("DivingGameManager");
|
||||
_instance = go.AddComponent<DivingGameManager>();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public static DivingGameManager Instance => _instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user