Files
przygody-pana-cegly/scripts/UI/SpeedRunHud.cs
Gabriel Kaszewski cfef49fbc7 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
2026-03-19 01:50:20 +01:00

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);
}
}