[gd_scene load_steps=5 format=2]

[ext_resource path="res://icon.png" type="Texture" id=1]

[sub_resource type="Curve" id=3]
min_value = -360.0
max_value = 360.0
_data = [ Vector2( 0, 360 ), 0.0, 0.0, 0, 0, Vector2( 1, -359.182 ), 0.0, 0.0, 0, 0 ]

[sub_resource type="Curve" id=2]
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.5, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]

[sub_resource type="GDScript" id=1]
script/source = "extends CPUParticles2D


# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"

var glob_pos = Vector2()
var motion = Vector2()
var speed = 100

# Called when the node enters the scene tree for the first time.
func _ready():
	var rot = rand_range(0,TAU)
	motion = Vector2(sin(rot), cos(rot)) * speed
	yield(Timergen.createtime(self,1.0),'timeout')
	emitting = false
	yield(Timergen.createtime(self,0.2),'timeout')
	queue_free()
	pass # Replace with function body.

var caller = null
var progres = 0

func _physics_process(delta):
	if is_instance_valid(caller):
		glob_pos += motion * delta
		progres += delta
		global_position = lerp(glob_pos,caller.global_position,progres)
"

[node name="CPUParticles2D" type="CPUParticles2D"]
modulate = Color( 1, 10, 10, 1 )
lifetime = 0.2
local_coords = false
texture = ExtResource( 1 )
gravity = Vector2( 0, 0 )
angle = -720.0
angle_random = 1.0
angle_curve = SubResource( 3 )
scale_amount = 0.25
scale_amount_curve = SubResource( 2 )
script = SubResource( 1 )
