with this in proces "self_destroy()" works too late
func _process(delta):
# pass
var x = cos(angle_to_x)*speed
var y = sin(angle_to_x)*speed
position+=Vector2(x*delta,-y*delta)
func self_destroy():
$Sprite.visible=false
$Timer.start()
$CPUParticles2D.emitting=true
yield($Timer, "timeout")
queue_free()
if I switch # it works in time. how to fix?