refactor: Consolidate skill component logic into SkillComponentBase and update manager access to singletons.

This commit is contained in:
2026-01-31 17:35:27 +01:00
parent 425fa5b940
commit 288f0b1916
27 changed files with 212 additions and 179 deletions

View File

@@ -14,6 +14,18 @@ public partial class FloatingTextManager : Node
[Export] public Color CoinColor { get; set; } = new Color("#ebd320"); // Gold
[Export] public Color MessageColor { get; set; } = new Color("#ffffff"); // White
public static FloatingTextManager Instance { get; private set; }
public override void _Ready()
{
Instance = this;
}
public override void _ExitTree()
{
if (Instance == this) Instance = null;
}
public void ShowDamage(float amount, Vector2 position)
{
var text = Mathf.Round(amount * 100f).ToString(CultureInfo.InvariantCulture);