[gd_scene load_steps=71 format=2]

[ext_resource path="res://Resources/Level_5_Enemy_Glowing_Ghost_Occluder.tres" type="OccluderPolygon2D" id=1]
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=2]
[ext_resource path="res://Enemies/Demon Boss.gd" type="Script" id=4]
[ext_resource path="res://Sprites/Enemies/Demon_Slime_Spritesheet.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Enemies/Chasing_Glowing_Ghost.png" type="Texture" id=7]

[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 5 )
region = Rect2( 0, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 5 )
region = Rect2( 288, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 5 )
region = Rect2( 576, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 5 )
region = Rect2( 864, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 5 )
region = Rect2( 1152, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 5 )
region = Rect2( 1440, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 5 )
region = Rect2( 1728, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 5 )
region = Rect2( 2016, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 5 )
region = Rect2( 2304, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=12]
atlas = ExtResource( 5 )
region = Rect2( 2592, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 5 )
region = Rect2( 2880, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 5 )
region = Rect2( 3168, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=15]
atlas = ExtResource( 5 )
region = Rect2( 3456, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=16]
atlas = ExtResource( 5 )
region = Rect2( 3744, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=17]
atlas = ExtResource( 5 )
region = Rect2( 4032, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=18]
atlas = ExtResource( 5 )
region = Rect2( 4320, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=19]
atlas = ExtResource( 5 )
region = Rect2( 4608, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=20]
atlas = ExtResource( 5 )
region = Rect2( 4896, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=21]
atlas = ExtResource( 5 )
region = Rect2( 5184, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=22]
atlas = ExtResource( 5 )
region = Rect2( 5472, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=23]
atlas = ExtResource( 5 )
region = Rect2( 5760, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=24]
atlas = ExtResource( 5 )
region = Rect2( 6048, 640, 288, 160 )

[sub_resource type="AtlasTexture" id=43]
atlas = ExtResource( 5 )
region = Rect2( 0, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=44]
atlas = ExtResource( 5 )
region = Rect2( 288, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=45]
atlas = ExtResource( 5 )
region = Rect2( 576, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=46]
atlas = ExtResource( 5 )
region = Rect2( 864, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=47]
atlas = ExtResource( 5 )
region = Rect2( 1152, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=48]
atlas = ExtResource( 5 )
region = Rect2( 1440, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=49]
atlas = ExtResource( 5 )
region = Rect2( 1728, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=50]
atlas = ExtResource( 5 )
region = Rect2( 2016, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=51]
atlas = ExtResource( 5 )
region = Rect2( 2304, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=52]
atlas = ExtResource( 5 )
region = Rect2( 2592, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=53]
atlas = ExtResource( 5 )
region = Rect2( 2880, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=54]
atlas = ExtResource( 5 )
region = Rect2( 3168, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=55]
atlas = ExtResource( 5 )
region = Rect2( 3456, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=56]
atlas = ExtResource( 5 )
region = Rect2( 3744, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=57]
atlas = ExtResource( 5 )
region = Rect2( 4032, 320, 288, 160 )

[sub_resource type="AtlasTexture" id=58]
atlas = ExtResource( 5 )
region = Rect2( 0, 480, 288, 160 )

[sub_resource type="AtlasTexture" id=59]
atlas = ExtResource( 5 )
region = Rect2( 288, 480, 288, 160 )

[sub_resource type="AtlasTexture" id=60]
atlas = ExtResource( 5 )
region = Rect2( 576, 480, 288, 160 )

[sub_resource type="AtlasTexture" id=61]
atlas = ExtResource( 5 )
region = Rect2( 864, 480, 288, 160 )

[sub_resource type="AtlasTexture" id=62]
atlas = ExtResource( 5 )
region = Rect2( 1152, 480, 288, 160 )

[sub_resource type="AtlasTexture" id=25]
atlas = ExtResource( 5 )
region = Rect2( 0, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=26]
atlas = ExtResource( 5 )
region = Rect2( 288, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=27]
atlas = ExtResource( 5 )
region = Rect2( 576, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=28]
atlas = ExtResource( 5 )
region = Rect2( 864, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=29]
atlas = ExtResource( 5 )
region = Rect2( 1152, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=30]
atlas = ExtResource( 5 )
region = Rect2( 1440, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=31]
atlas = ExtResource( 5 )
region = Rect2( 1728, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=32]
atlas = ExtResource( 5 )
region = Rect2( 2016, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=33]
atlas = ExtResource( 5 )
region = Rect2( 2304, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=34]
atlas = ExtResource( 5 )
region = Rect2( 2592, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=35]
atlas = ExtResource( 5 )
region = Rect2( 2880, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=36]
atlas = ExtResource( 5 )
region = Rect2( 3168, 160, 288, 160 )

[sub_resource type="AtlasTexture" id=37]
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 288, 160 )

[sub_resource type="AtlasTexture" id=38]
atlas = ExtResource( 5 )
region = Rect2( 288, 0, 288, 160 )

[sub_resource type="AtlasTexture" id=39]
atlas = ExtResource( 5 )
region = Rect2( 576, 0, 288, 160 )

[sub_resource type="AtlasTexture" id=40]
atlas = ExtResource( 5 )
region = Rect2( 864, 0, 288, 160 )

[sub_resource type="AtlasTexture" id=41]
atlas = ExtResource( 5 )
region = Rect2( 1152, 0, 288, 160 )

[sub_resource type="AtlasTexture" id=42]
atlas = ExtResource( 5 )
region = Rect2( 1440, 0, 288, 160 )

[sub_resource type="SpriteFrames" id=63]
animations = [ {
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ],
"loop": true,
"name": "Death",
"speed": 5.0
}, {
"frames": [ SubResource( 43 ), SubResource( 44 ), SubResource( 45 ), SubResource( 46 ), SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ) ],
"loop": true,
"name": "Attack",
"speed": 15.0
}, {
"frames": [ SubResource( 58 ), SubResource( 59 ), SubResource( 60 ), SubResource( 61 ), SubResource( 62 ) ],
"loop": true,
"name": "Hit",
"speed": 5.0
}, {
"frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ), SubResource( 33 ), SubResource( 34 ), SubResource( 35 ), SubResource( 36 ) ],
"loop": true,
"name": "Walk",
"speed": 5.0
}, {
"frames": [ SubResource( 37 ), SubResource( 38 ), SubResource( 39 ), SubResource( 40 ), SubResource( 41 ), SubResource( 42 ) ],
"loop": true,
"name": "Idle",
"speed": 5.0
} ]

[sub_resource type="CapsuleShape2D" id=64]
radius = 1.5
height = 3.0

[sub_resource type="CapsuleShape2D" id=1]
radius = 26.0
height = 2.0

[sub_resource type="CircleShape2D" id=2]
radius = 144.003

[sub_resource type="CircleShape2D" id=65]
radius = 42.0

[node name="Demon Boss" type="KinematicBody2D" groups=["enemy"]]
light_mask = 0
collision_layer = 4
collision_mask = 5
script = ExtResource( 4 )

[node name="AnimatedSprite1" type="AnimatedSprite" parent="."]
position = Vector2( 2, -15 )
scale = Vector2( 0.5, 0.5 )
frames = SubResource( 63 )
animation = "Idle"
frame = 5
playing = true

[node name="Sprite" type="Sprite" parent="."]
visible = false
light_mask = 4
position = Vector2( 0, -3 )
texture = ExtResource( 7 )
offset = Vector2( 0, 0.5 )

[node name="Collision" type="CollisionShape2D" parent="."]
visible = false
light_mask = 0
rotation = 1.5708
shape = SubResource( 64 )

[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox_1"]]
light_mask = 0
collision_layer = 4
collision_mask = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
visible = false
light_mask = 0
position = Vector2( 2, 5 )
shape = SubResource( 1 )

[node name="Player Detector" type="Area2D" parent="."]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false

[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
light_mask = 0
shape = SubResource( 2 )

[node name="Player Detector - Attack" type="Area2D" parent="."]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false

[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack"]
shape = SubResource( 65 )

[node name="Player Detector - Attack2" type="Area2D" parent="."]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false

[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack2"]
visible = false
shape = SubResource( 65 )

[node name="Light" type="Light2D" parent="."]
visible = false
texture = ExtResource( 2 )
texture_scale = 0.5
color = Color( 0.984314, 0.94902, 0.211765, 0.392157 )
energy = 2.0
range_item_cull_mask = 11

[node name="Eyes" type="Light2D" parent="."]
visible = false
scale = Vector2( 0.1, 0.1 )
texture = ExtResource( 2 )
offset = Vector2( 5, -35 )
range_item_cull_mask = 4
shadow_item_cull_mask = 0

[node name="Occluder" type="LightOccluder2D" parent="."]
visible = false
show_behind_parent = true
occluder = ExtResource( 1 )

[connection signal="area_entered" from="Hitbox" to="." method="_on_hitbox_area_entered"]
[connection signal="body_entered" from="Player Detector" to="." method="_on_player_detector_body_entered"]
[connection signal="body_exited" from="Player Detector" to="." method="_on_player_detector_body_exited"]
[connection signal="body_entered" from="Player Detector - Attack" to="." method="_on_Player_Detector__Attack_body_entered"]
[connection signal="body_exited" from="Player Detector - Attack" to="." method="_on_Player_Detector__Attack_body_exited"]
[connection signal="body_entered" from="Player Detector - Attack2" to="." method="_on_Player_Detector__Attack_body_entered"]
[connection signal="body_exited" from="Player Detector - Attack2" to="." method="_on_Player_Detector__Attack_body_exited"]
