[gd_scene load_steps=11 format=3 uid="uid://gq6u7iesbchb"]

[ext_resource type="Script" path="res://assets/scenes/demon.gd" id="1_7dbuk"]
[ext_resource type="Texture2D" uid="uid://dl8yyrdb8o001" path="res://assets/textures/survivors/purple/demon_idle.png" id="1_efcu4"]
[ext_resource type="Texture2D" uid="uid://bf3ayj1blr6bk" path="res://assets/textures/survivors/purple/demon_shoot_1.png" id="2_yw5ej"]
[ext_resource type="Texture2D" uid="uid://c3kee723fcojn" path="res://assets/textures/survivors/purple/demon_shoot_2.png" id="3_nvdqw"]
[ext_resource type="Texture2D" uid="uid://gg4oygilqclm" path="res://assets/textures/survivors/purple/demon_shoot_3.png" id="4_g3y15"]
[ext_resource type="Texture2D" uid="uid://b23076s18srxm" path="res://assets/textures/survivors/purple/demon_shoot_4.png" id="5_50e2m"]
[ext_resource type="AudioStream" uid="uid://uet8fl1medm2" path="res://assets/audio/explosion_2.wav" id="7_sniq6"]

[sub_resource type="SpriteFrames" id="SpriteFrames_nbhay"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_efcu4")
}],
"loop": false,
"name": &"idle",
"speed": 1.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_yw5ej")
}, {
"duration": 1.0,
"texture": ExtResource("3_nvdqw")
}, {
"duration": 1.0,
"texture": ExtResource("4_g3y15")
}, {
"duration": 1.0,
"texture": ExtResource("5_50e2m")
}],
"loop": false,
"name": &"shoot",
"speed": 20.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_d3lxi"]
size = Vector2(246.529, 258.823)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_pkx02"]
size = Vector2(1400, 1000)

[node name="Demon" type="Area2D" groups=["drag", "survivor"]]
z_as_relative = false
scale = Vector2(0.17, 0.17)
collision_layer = 128
collision_mask = 64
script = ExtResource("1_7dbuk")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -117.647)
sprite_frames = SubResource("SpriteFrames_nbhay")
animation = &"shoot"

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

[node name="Vision" type="ShapeCast2D" parent="."]
position = Vector2(0, -658.823)
shape = SubResource("RectangleShape2D_pkx02")
collision_mask = 4
collide_with_areas = true
collide_with_bodies = false

[node name="Polygon2D" type="Polygon2D" parent="Vision"]
visible = false
position = Vector2(-5.88235, 664.706)
color = Color(0.0470588, 1, 1, 0.207843)
polygon = PackedVector2Array(700, -135.294, 700, -1135.29, -700, -1135.29, -700, -135.294)

[node name="GunShotSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource("7_sniq6")

[connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
