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:
@@ -11,8 +11,7 @@ public partial class SpeedRunManager : Node
|
||||
public override void _ExitTree() { if (Instance == this) Instance = null; }
|
||||
|
||||
public bool IsRunning { get; private set; } = false;
|
||||
public bool IsVisible { get; private set; } = false;
|
||||
|
||||
|
||||
private double _startTime;
|
||||
private double _levelStartTime;
|
||||
private List<double> _splits = [];
|
||||
@@ -21,7 +20,7 @@ public partial class SpeedRunManager : Node
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!IsRunning || !IsVisible) return;
|
||||
if (!IsRunning) return;
|
||||
|
||||
EmitSignalTimeUpdated(GetCurrentTotalTime(), GetCurrentLevelTime());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user