Refactor ChargeProgressBar and SkillManager; update skill handling and improve component interactions

This commit is contained in:
2025-08-27 00:14:41 +02:00
parent 421a31917d
commit c34b9bc16f
4 changed files with 47 additions and 17 deletions

View File

@@ -86,7 +86,9 @@ public partial class BrickThrowComponent : Node, ISkill
{
PlayerController = owner as PlayerController;
_skillData = data;
ThrowInputBehavior = (ThrowInputResource)ThrowInputBehavior?.Duplicate();
if (PlayerController == null)
{
GD.PushError("BrickThrowComponent: Owner is not a PlayerController.");
@@ -101,6 +103,7 @@ public partial class BrickThrowComponent : Node, ISkill
public void Activate()
{
if (ThrowInputBehavior != null) ThrowInputBehavior.ThrowRequested += ThrowBrick;
SetProcessInput(true);
}
public void Deactivate()