feat: Implement a skill pickup system with a new collectable type, event handling, and dedicated pickup objects.

This commit is contained in:
2026-01-31 17:12:57 +01:00
parent fda544d0f1
commit 425fa5b940
11 changed files with 145 additions and 2 deletions

View File

@@ -64,6 +64,13 @@ public partial class CollectableComponent : Node
_floatingTextManager?.ShowMessage("Rescued!", ownerNode.GlobalPosition);
EventBus.EmitChildRescued(ownerNode.GlobalPosition);
break;
case CollectableType.Skill:
if (Data.Skill != null)
{
_floatingTextManager?.ShowMessage($"{Data.Skill.Name} Unlocked!", ownerNode.GlobalPosition);
EventBus.EmitSkillCollected(Data.Skill, ownerNode.GlobalPosition);
}
break;
default:
EventBus.EmitItemCollected(Data.Type, Data.Amount, ownerNode.GlobalPosition);
break;