using Godot; public partial class CompoundProjectile : Node2D { // Called when the node enters the scene tree for the first time. public override void _Ready() { GetTree().ProcessFrame += ReleaseCompound; } public void ReleaseCompound() { GetTree().ProcessFrame -= ReleaseCompound; foreach (var child in GetChildren()) { child.Reparent(GetParent()); } QueueFree(); } }