refactor: Replace hardcoded node paths with constants and remove ScoreComponent.

This commit is contained in:
2026-01-31 15:35:04 +01:00
parent 62bdf1ba39
commit b62478bbea
27 changed files with 183 additions and 202 deletions

View File

@@ -1,4 +1,5 @@
using Godot;
using Mr.BrickAdventures;
using Mr.BrickAdventures.Autoloads;
namespace Mr.BrickAdventures.scripts.UI;
@@ -7,15 +8,15 @@ namespace Mr.BrickAdventures.scripts.UI;
public partial class SpeedRunHud : Control
{
[Export] private Label _timerLabel;
private SpeedRunManager _speedRunManager;
public override void _Ready()
{
_speedRunManager = GetNode<SpeedRunManager>("/root/SpeedRunManager");
_speedRunManager = GetNode<SpeedRunManager>(Constants.SpeedRunManagerPath);
_speedRunManager.TimeUpdated += OnTimerUpdated;
Visible = _speedRunManager.IsVisible;
}