[gd_scene load_steps=9 format=3 uid="uid://domeukw4ucmyr"]

[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/LinearProjectile.cs" id="1_fkydi"]
[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="2_fn62x"]
[ext_resource type="Texture2D" uid="uid://dn4l67snkx5mr" path="res://assets/sprites/plants/snowpea_projectile.tres" id="2_xt8td"]
[ext_resource type="PackedScene" uid="uid://cijchi3f01q2t" path="res://scenes/particles/snow_pea_particles.tscn" id="3_t6hp0"]
[ext_resource type="Texture2D" uid="uid://dejgsyw4f2crg" path="res://assets/sprites/particles/snowpea_flake1.tres" id="5_1u1j3"]
[ext_resource type="Material" uid="uid://bflocbxbpv73j" path="res://assets/sprites/particles/snowflake.tres" id="6_pcdfd"]
[ext_resource type="Texture2D" uid="uid://deiu2jr26meq" path="res://assets/sprites/particles/snowpea_flake2.tres" id="7_xke8y"]

[sub_resource type="CircleShape2D" id="CircleShape2D_ix1sk"]
radius = 6.0

[node name="Snowpea" type="Area2D"]
collision_layer = 4
collision_mask = 8
script = ExtResource("1_fkydi")
_speed = 3.0
_damage = 10
_impactEffect = ExtResource("2_fn62x")
particles = ExtResource("3_t6hp0")

[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("2_xt8td")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_ix1sk")

[node name="Timer" type="Timer" parent="."]
wait_time = 15.0
one_shot = true
autostart = true

[node name="Particles1" type="GPUParticles2D" parent="."]
position = Vector2(-5, 0)
amount = 1
texture = ExtResource("5_1u1j3")
process_material = ExtResource("6_pcdfd")

[node name="Particles2" type="GPUParticles2D" parent="."]
position = Vector2(5, 0)
emitting = false
amount = 1
texture = ExtResource("7_xke8y")
process_material = ExtResource("6_pcdfd")

[node name="Timer" type="Timer" parent="Particles2"]
wait_time = 0.2
one_shot = true
autostart = true

[connection signal="area_entered" from="." to="." method="OnAreaEntered"]
[connection signal="timeout" from="Timer" to="." method="queue_free"]
[connection signal="timeout" from="Particles2/Timer" to="Particles2" method="set_emitting" binds= [true]]
