made weapon into a dependant and used new forgeneitty node as a node3d

This commit is contained in:
2026-05-02 16:13:23 +02:00
parent 0e6211943d
commit 852f265b9f
8 changed files with 108 additions and 69 deletions

View File

@@ -29,7 +29,8 @@ public class ExplodingSwordBehavior(PackedScene explosion, float radius) : IAbil
return;
}
explo.Radius = radius;
GD.Print("explosion");
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explo);
explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);