Last life cycle refactor updates + add comprehensive documentation (#57)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com> Reviewed-on: #57
This commit is contained in:
@@ -103,7 +103,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()
|
||||
@@ -161,10 +160,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