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,5 +1,6 @@
using Godot;
using Godot.Collections;
using Mr.BrickAdventures;
using Mr.BrickAdventures.Autoloads;
using Mr.BrickAdventures.scripts.interfaces;
using Mr.BrickAdventures.scripts.Resources;
@@ -18,8 +19,8 @@ public partial class SkillUnlockerComponent : Node
public override void _Ready()
{
_gameManager = GetNode<GameManager>("/root/GameManager");
SkillManager = GetNode<SkillManager>("/root/SkillManager");
_gameManager = GetNode<GameManager>(Constants.GameManagerPath);
SkillManager = GetNode<SkillManager>(Constants.SkillManagerPath);
}
private bool HasEnoughCoins(int amount)