[gd_scene load_steps=12 format=3 uid="uid://oi8svqsspcsj"]

[ext_resource type="Script" uid="uid://d0a0o50j82eo6" path="res://Scripts/Activables/ScriptableBase.cs" id="1_cpf8e"]
[ext_resource type="Script" uid="uid://dmo0pw7natoja" path="res://Scripts/Interactables/AreaTrigger.cs" id="2_xybrs"]
[ext_resource type="Texture2D" uid="uid://bs5fsrx07bolj" path="res://Sprites/Actors/MovementSensor.png" id="3_xybrs"]
[ext_resource type="Script" uid="uid://cq3hkweplldbr" path="res://Scripts/Components/Actors/GenericDamageReceiver.cs" id="4_hqdqa"]
[ext_resource type="PackedScene" uid="uid://dbd7pmoevm787" path="res://Scenes/Interactable/DestroyedMovementSensor.tscn" id="5_hqdqa"]
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="6_58ipm"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_1nht3"]
size = Vector2(4, 30)

[sub_resource type="AtlasTexture" id="AtlasTexture_a8ahg"]
atlas = ExtResource("3_xybrs")
region = Rect2(0, 0, 8, 8)

[sub_resource type="AtlasTexture" id="AtlasTexture_5aqpj"]
atlas = ExtResource("3_xybrs")
region = Rect2(8, 0, 8, 8)

[sub_resource type="SpriteFrames" id="SpriteFrames_hqdqa"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_a8ahg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5aqpj")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="CircleShape2D" id="CircleShape2D_5j6xs"]
radius = 3.0

[node name="MovementSensor" type="Node2D"]
script = ExtResource("1_cpf8e")

[node name="AreaTrigger" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 2
script = ExtResource("2_xybrs")
OneTime = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="AreaTrigger"]
position = Vector2(0, 15)
shape = SubResource("RectangleShape2D_1nht3")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_hqdqa")
autoplay = "default"

[node name="DamageReceiver" type="Area2D" parent="." node_paths=PackedStringArray("HealthProvider")]
collision_layer = 64
collision_mask = 136
script = ExtResource("4_hqdqa")
HealthProvider = NodePath("Health")
Debris = ExtResource("5_hqdqa")

[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver"]
shape = SubResource("CircleShape2D_5j6xs")

[node name="Health" type="Node2D" parent="DamageReceiver"]
script = ExtResource("6_58ipm")
ResourceName = "Health"
MaxResource = 1.0

[connection signal="Activated" from="AreaTrigger" to="." method="Start"]
[connection signal="area_entered" from="AreaTrigger" to="AreaTrigger" method="_on_area_entered"]
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
