Further updates to state machines
This commit is contained in:
@@ -106,10 +106,9 @@ namespace Minigames.DivingForPictures
|
||||
public override int ManagedAwakePriority => 190;
|
||||
public override bool AutoRegisterPausable => true; // Automatic GameManager registration
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
protected override void Awake()
|
||||
{
|
||||
_settings = GameManager.GetSettingsObject<IDivingMinigameSettings>();
|
||||
_currentSpawnProbability = _settings?.BaseSpawnProbability ?? 0.2f;
|
||||
base.Awake();
|
||||
|
||||
if (_instance == null)
|
||||
{
|
||||
@@ -119,7 +118,13 @@ namespace Minigames.DivingForPictures
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnManagedAwake()
|
||||
{
|
||||
_settings = GameManager.GetSettingsObject<IDivingMinigameSettings>();
|
||||
_currentSpawnProbability = _settings?.BaseSpawnProbability ?? 0.2f;
|
||||
|
||||
// Ensure any previous run state is reset when this manager awakes
|
||||
_isGameOver = false;
|
||||
|
||||
@@ -187,6 +192,8 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(_settings == null) return;
|
||||
|
||||
_timeSinceLastSpawn += Time.deltaTime;
|
||||
|
||||
// Gradually increase spawn probability over time
|
||||
|
||||
Reference in New Issue
Block a user