refactor: standardization round 2
- ConsoleManager: lazy GameManager/AchievementManager via Instance (fixes NullRef on console commands) - AchievementManager, GhostManager: add static Instance property - GhostEventHandler: use GhostManager.Instance, add _ExitTree unsubscription - SpeedRunManager: remove unused IsVisible guard; TimeUpdated now emits when running - SpeedRunHud: use SpeedRunManager.Instance, remove dead IsVisible binding - SaveDataDto: moved to scripts/State/SaveDataDto.cs - GameManager.AddCoins: XML doc clarifying permanent vs session coins
This commit is contained in:
@@ -7,8 +7,13 @@ namespace Mr.BrickAdventures.Autoloads;
|
||||
|
||||
public partial class GhostManager : Node
|
||||
{
|
||||
public static GhostManager Instance { get; private set; }
|
||||
|
||||
[Export] private PackedScene GhostPlayerScene { get; set; }
|
||||
|
||||
|
||||
public override void _Ready() => Instance = this;
|
||||
public override void _ExitTree() { if (Instance == this) Instance = null; }
|
||||
|
||||
public bool IsRecording { get; private set; } = false;
|
||||
public bool IsPlaybackEnabled { get; private set; } = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user