refactor: Consolidate skill component logic into SkillComponentBase and update manager access to singletons.
This commit is contained in:
@@ -19,7 +19,7 @@ public partial class MarketplaceButton : Button
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_gameManager = GetNode<GameManager>(Constants.GameManagerPath);
|
||||
_gameManager = GameManager.Instance;
|
||||
var player = _gameManager.Player;
|
||||
if (player == null) return;
|
||||
|
||||
@@ -29,7 +29,7 @@ public partial class MarketplaceButton : Button
|
||||
_skillUnlockerComponent.SkillUnlocked += OnSkillStateChanged;
|
||||
}
|
||||
|
||||
_skillManager = GetNode<SkillManager>(Constants.SkillManagerPath);
|
||||
_skillManager = SkillManager.Instance;
|
||||
_skillManager.SkillRemoved += OnSkillStateChanged;
|
||||
|
||||
UpdateButtonState();
|
||||
|
||||
Reference in New Issue
Block a user