- 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
21 lines
476 B
C#
21 lines
476 B
C#
using Godot;
|
|
using Mr.BrickAdventures;
|
|
using Mr.BrickAdventures.Autoloads;
|
|
|
|
namespace Mr.BrickAdventures.scripts.UI;
|
|
|
|
[GlobalClass]
|
|
public partial class SpeedRunHud : Control
|
|
{
|
|
[Export] private Label _timerLabel;
|
|
|
|
public override void _Ready()
|
|
{
|
|
SpeedRunManager.Instance.TimeUpdated += OnTimerUpdated;
|
|
}
|
|
|
|
private void OnTimerUpdated(double totalTime, double levelTime)
|
|
{
|
|
_timerLabel.Text = SpeedRunManager.FormatTime(totalTime);
|
|
}
|
|
} |