[gd_scene format=3 uid="uid://bcgdkojealqoo"]

[ext_resource type="Script" uid="uid://bkp8t4mvdhtqq" path="res://scripts/trap.gd" id="1_62q8x"]
[ext_resource type="Texture2D" uid="uid://b6eeio3gm7d4u" path="res://assets/gfx/traps/Floor_Lance.png" id="2_aucmg"]
[ext_resource type="AudioStream" uid="uid://raqmpvp1vj04" path="res://assets/audio/sfx/traps/activate.mp3" id="3_tk2q1"]
[ext_resource type="AudioStream" uid="uid://dxy2phfh0ojot" path="res://assets/audio/sfx/player/dodge/Dodge.mp3" id="4_1sb0t"]

[sub_resource type="Animation" id="Animation_tk2q1"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="Animation" id="Animation_1sb0t"]
resource_name = "activate"
length = 1.4333333
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.033333335, 0.06666667, 0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}

[sub_resource type="Animation" id="Animation_62q8x"]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="Animation" id="Animation_aucmg"]
resource_name = "reset"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.033333335, 0.06666667, 0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [3, 2, 1, 0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_7s8xa"]
_data = {
&"RESET": SubResource("Animation_tk2q1"),
&"activate": SubResource("Animation_1sb0t"),
&"idle": SubResource("Animation_62q8x"),
&"reset": SubResource("Animation_aucmg")
}

[sub_resource type="RectangleShape2D" id="RectangleShape2D_62q8x"]
size = Vector2(16, 16)

[sub_resource type="CircleShape2D" id="CircleShape2D_aucmg"]
radius = 17.117243

[sub_resource type="CircleShape2D" id="CircleShape2D_62q8x"]
radius = 99.0202

[node name="Trap" type="Node2D" unique_id=131165873]
script = ExtResource("1_62q8x")

[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1625881554]
texture = ExtResource("2_aucmg")
hframes = 4

[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1394959342]
libraries/ = SubResource("AnimationLibrary_7s8xa")

[node name="ActivationArea" type="Area2D" parent="." unique_id=694690572]
collision_layer = 4096

[node name="CollisionShape2D" type="CollisionShape2D" parent="ActivationArea" unique_id=1574459451]
shape = SubResource("RectangleShape2D_62q8x")

[node name="DisarmArea" type="Area2D" parent="." unique_id=687041294]
collision_layer = 4096

[node name="CollisionShape2D" type="CollisionShape2D" parent="DisarmArea" unique_id=1192467236]
shape = SubResource("CircleShape2D_aucmg")
debug_color = Color(0.70196074, 0.614594, 0.08530171, 0.41960785)

[node name="DetectionArea" type="Area2D" parent="." unique_id=1872122085]
collision_layer = 0

[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea" unique_id=1024222789]
shape = SubResource("CircleShape2D_62q8x")
debug_color = Color(0.53960574, 0.04878081, 0.70196074, 0.41960785)

[node name="SfxActivate" type="AudioStreamPlayer2D" parent="." unique_id=312292112]
stream = ExtResource("3_tk2q1")
volume_db = -1.559
attenuation = 4.438279
panning_strength = 1.03
bus = &"Sfx"

[node name="SfxAvoid" type="AudioStreamPlayer2D" parent="." unique_id=322639992]
stream = ExtResource("4_1sb0t")
pitch_scale = 1.35
attenuation = 1.9318731
bus = &"Sfx"

[node name="SfxDisarming" type="AudioStreamPlayer2D" parent="." unique_id=920322213]
bus = &"Sfx"

[connection signal="body_shape_entered" from="ActivationArea" to="." method="_on_activation_area_body_shape_entered"]
