Final touchups to the lifecycle management
This commit is contained in:
@@ -104,7 +104,6 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
public static DivingGameManager Instance => _instance;
|
||||
|
||||
public override int ManagedAwakePriority => 190;
|
||||
public override bool AutoRegisterPausable => true; // Automatic GameManager registration
|
||||
|
||||
internal override void OnManagedAwake()
|
||||
@@ -162,10 +161,8 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
internal override void OnManagedDestroy()
|
||||
{
|
||||
base.OnDestroy(); // Handles auto-unregister from GameManager
|
||||
|
||||
// Unsubscribe from events when the manager is destroyed
|
||||
PlayerCollisionBehavior.OnDamageTaken -= OnPlayerDamageTaken;
|
||||
OnMonsterSpawned -= DoMonsterSpawned;
|
||||
|
||||
Reference in New Issue
Block a user