[gd_scene load_steps=20 format=4 uid="uid://bdpobbbi6apq5"]

[ext_resource type="Texture2D" uid="uid://2aopgpvv473r" path="res://assets/textures/tilemaps/level_interior_tileset.png" id="1_satx0"]
[ext_resource type="PackedScene" uid="uid://dfbomt0l6b1o4" path="res://scenes/player.tscn" id="2_0t8x2"]
[ext_resource type="PackedScene" uid="uid://sr8t2lu6apr4" path="res://scenes/enemies/skull.tscn" id="3_u5kpk"]
[ext_resource type="AudioStream" uid="uid://c7558jjqywld1" path="res://assets/audio/music/boss_theme.ogg" id="4_ij6uy"]
[ext_resource type="Texture2D" uid="uid://dsapnb753puib" path="res://assets/textures/spritesheets/dark_house_assets.png" id="5_piajy"]

[sub_resource type="GDScript" id="GDScript_piajy"]
script/source = "extends Node2D

func _on_child_exiting_tree(_node: Node) -> void:
	if get_tree().get_node_count_in_group(\"Enemy\") == 0:
		get_tree().call_deferred(\"change_scene_to_file\", \"res://scenes/menus/win.tscn\")
"

[sub_resource type="NavigationPolygon" id="NavigationPolygon_0t8x2"]
vertices = PackedVector2Array(16, 16, 2, 16, 2, 10, 16, 10)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(2, 10, 16, 10, 16, 16, 2, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_u5kpk"]
vertices = PackedVector2Array(16, 16, 2, 16, 2, -16, 16, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(2, -16, 16, -16, 16, 16, 2, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_ij6uy"]
vertices = PackedVector2Array(16, -8, 2, -8, 2, -16, 16, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(2, -16, 16, -16, 16, -8, 2, -8)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_piajy"]
vertices = PackedVector2Array(16, 16, -16, 16, -16, 10, 16, 10)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, 10, 16, 10, 16, 16, -16, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_v45sh"]
vertices = PackedVector2Array(16, 16, -16, 16, -16, -16, 16, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_l6efi"]
vertices = PackedVector2Array(16, -8, -16, -8, -16, -16, 16, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, -16, 16, -16, 16, -8, -16, -8)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_3u0n1"]
vertices = PackedVector2Array(-1, 16, -16, 16, -16, 10, -1, 10)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, 10, -1, 10, -1, 16, -16, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_2lf8p"]
vertices = PackedVector2Array(-1.5, 16, -16, 16, -16, -16, -1.5, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, -16, -1.5, -16, -1.5, 16, -16, 16)])
agent_radius = 0.0

[sub_resource type="NavigationPolygon" id="NavigationPolygon_vpggf"]
vertices = PackedVector2Array(-1, -8, -16, -8, -16, -16, -1, -16)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-16, -16, -1, -16, -1, -8, -16, -8)])
agent_radius = 0.0

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u5kpk"]
texture = ExtResource("1_satx0")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 10, 2, 10, 2, 16, -16, 16)
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_0t8x2")
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 10, -16, 10)
1:0/0/terrains_peering_bit/bottom_right_corner = 0
1:0/0/terrains_peering_bit/bottom_side = 0
1:0/0/terrains_peering_bit/bottom_left_corner = 0
1:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_piajy")
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -1, 16, -0.9796982, 10, -16, 10)
2:0/0/terrains_peering_bit/bottom_left_corner = 0
2:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_3u0n1")
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 2, -16, 2, 16, -16, 16)
0:1/0/terrains_peering_bit/right_side = 0
0:1/0/terrains_peering_bit/bottom_right_corner = 0
0:1/0/terrains_peering_bit/top_right_corner = 0
0:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_u5kpk")
1:1/0 = 0
1:1/0/terrain_set = 0
1:1/0/terrain = 0
1:1/0/terrains_peering_bit/right_side = 0
1:1/0/terrains_peering_bit/bottom_right_corner = 0
1:1/0/terrains_peering_bit/bottom_side = 0
1:1/0/terrains_peering_bit/bottom_left_corner = 0
1:1/0/terrains_peering_bit/left_side = 0
1:1/0/terrains_peering_bit/top_left_corner = 0
1:1/0/terrains_peering_bit/top_side = 0
1:1/0/terrains_peering_bit/top_right_corner = 0
1:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_v45sh")
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-1, -16, 16, -16, 16, 16, -1, 16)
2:1/0/terrains_peering_bit/bottom_left_corner = 0
2:1/0/terrains_peering_bit/left_side = 0
2:1/0/terrains_peering_bit/top_left_corner = 0
2:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_2lf8p")
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 2, -16, 2, -8, 16, -8, 16, 16, -16, 16)
0:2/0/terrains_peering_bit/top_right_corner = 0
0:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ij6uy")
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, 16, -16, 16, -16, -8, 16, -8)
1:2/0/terrains_peering_bit/top_left_corner = 0
1:2/0/terrains_peering_bit/top_side = 0
1:2/0/terrains_peering_bit/top_right_corner = 0
1:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_l6efi")
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-1, -16, 16, -16, 16, 16, -16, 16, -16, -8, -1, -8)
2:2/0/terrains_peering_bit/top_left_corner = 0
2:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_vpggf")

[sub_resource type="TileSet" id="TileSet_u5kpk"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "Ground 0"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
navigation_layer_0/layers = 1
sources/1 = SubResource("TileSetAtlasSource_u5kpk")

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v45sh"]
texture = ExtResource("5_piajy")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
1:0/0 = 0
2:0/0 = 0
3:0/0 = 0
4:0/0 = 0
0:1/0 = 0
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:1/0 = 0
1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:1/0 = 0
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
3:1/0 = 0
4:1/0 = 0
6:1/0 = 0
7:1/0 = 0
0:2/0 = 0
1:2/0 = 0
2:2/0 = 0
3:2/0 = 0
4:2/0 = 0
5:2/0 = 0
6:2/0 = 0
7:2/0 = 0
0:3/0 = 0
0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:3/0 = 0
1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:3/0 = 0
2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
3:3/0 = 0
3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:3/0 = 0
5:3/0 = 0
6:3/0 = 0
7:3/0 = 0

[sub_resource type="TileSet" id="TileSet_l6efi"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
sources/1 = SubResource("TileSetAtlasSource_v45sh")

[node name="Lvl1" type="Node2D"]
y_sort_enabled = true
script = SubResource("GDScript_piajy")

[node name="TileMapLayer" type="TileMapLayer" parent="."]
z_index = -1
y_sort_enabled = true
tile_map_data = PackedByteArray("AAD//wAAAQABAAEAAAAAAAAAAQABAAEAAAAAAAEAAQABAAEAAAD//wEAAQABAAEAAAD+/wEAAQABAAEAAAD+/wAAAQABAAEAAAD+////AQABAAEAAAD/////AQABAAEAAAAAAP//AQABAAEAAAABAAAAAQABAAEAAAABAAEAAQABAAEAAAABAP//AQABAAEAAAAAAP7/AQABAAEAAAABAP7/AQABAAEAAAD///7/AQABAAEAAAD+//7/AQABAAEAAAACAP//AQABAAEAAAACAAAAAQABAAEAAAACAP7/AQABAAEAAAADAP//AQABAAEAAAADAAAAAQABAAEAAAADAP7/AQABAAEAAAAEAP//AQABAAEAAAAEAAAAAQABAAEAAAAEAP7/AQABAAEAAAAEAP3/AQABAAEAAAAFAP3/AQACAAEAAAAFAP7/AQACAAEAAAADAP3/AQABAAEAAAADAPz/AQABAAEAAAAEAPz/AQABAAEAAAAFAPz/AQACAAEAAAAFAP//AQACAAEAAAACAP3/AQABAAEAAAACAPz/AQABAAEAAAABAP3/AQABAAEAAAABAPz/AQABAAEAAAAAAP3/AQABAAEAAAAAAPz/AQABAAEAAAD///3/AQABAAEAAAD///z/AQABAAEAAAD+//3/AQABAAEAAAD+//z/AQABAAEAAAD9////AQABAAEAAAD9//7/AQABAAEAAAD9//3/AQABAAEAAAD9//z/AQABAAEAAAD9/wAAAQABAAEAAAD9/wEAAQABAAEAAAACAAEAAQABAAEAAAACAAIAAQABAAEAAAABAAIAAQABAAEAAAAAAAIAAQABAAEAAAD//wIAAQABAAEAAAD+/wIAAQABAAEAAAD9/wIAAQABAAEAAAADAAEAAQABAAEAAAADAAIAAQABAAEAAAAEAAEAAQABAAEAAAAEAAIAAQABAAEAAAAFAAAAAQACAAEAAAAFAAEAAQACAAEAAAAFAAIAAQACAAEAAAD8/wIAAQABAAEAAAD8/wMAAQABAAIAAAD7/wMAAQABAAIAAAD7/wIAAQABAAEAAAD7/wEAAQABAAEAAAD8/wEAAQABAAEAAAD7/wAAAQABAAEAAAD8/wAAAQABAAEAAAD7////AQABAAEAAAD8////AQABAAEAAAD7//7/AQABAAEAAAD8//7/AQABAAEAAAD7//3/AQABAAEAAAD8//3/AQABAAEAAAD7//z/AQABAAEAAAD8//z/AQABAAEAAAD9/wMAAQABAAIAAAD+/wMAAQABAAIAAAD//wMAAQABAAIAAAAAAAMAAQABAAIAAAABAAMAAQABAAIAAAACAAMAAQABAAIAAAADAAMAAQABAAIAAAAEAAMAAQABAAIAAAAFAAMAAQACAAIAAAD6/wMAAQAAAAIAAAD6/wIAAQAAAAEAAAD6/wEAAQAAAAEAAAD6/wAAAQAAAAEAAAD6////AQAAAAEAAAD6//7/AQAAAAEAAAD6//3/AQAAAAEAAAD6//z/AQAAAAEAAAD6//v/AQAAAAAAAAD7//v/AQABAAAAAAD8//v/AQABAAAAAAD9//v/AQABAAAAAAD+//v/AQABAAAAAAD///v/AQABAAAAAAAAAPv/AQABAAAAAAABAPv/AQABAAAAAAACAPv/AQABAAAAAAADAPv/AQABAAAAAAAEAPv/AQABAAAAAAAFAPv/AQACAAAAAAA=")
tile_set = SubResource("TileSet_u5kpk")
rendering_quadrant_size = 32
physics_quadrant_size = 32

[node name="Player" parent="." node_paths=PackedStringArray("tilemap") instance=ExtResource("2_0t8x2")]
tilemap = NodePath("../TileMapLayer")

[node name="Skull" parent="." instance=ExtResource("3_u5kpk")]
position = Vector2(-111, -50)

[node name="Skull2" parent="." instance=ExtResource("3_u5kpk")]
position = Vector2(8, -106)

[node name="Skull3" parent="." instance=ExtResource("3_u5kpk")]
position = Vector2(140, -102)

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_ij6uy")
autoplay = true

[node name="TileMapLayer2" type="TileMapLayer" parent="."]
y_sort_enabled = true
tile_map_data = PackedByteArray("AAD7//3/AQAAAAMAAAD7//z/AQAAAAIAAAD8//3/AQABAAMAAAD8//z/AQABAAIAAAABAP3/AQACAAMAAAACAP3/AQADAAMAAAABAPz/AQACAAIAAAACAPz/AQADAAIAAAAEAP7/AQACAAEAAAAEAP3/AQACAAAAAAAEAAEAAQAAAAAAAAAEAAIAAQAAAAEAAAD7/wEAAQABAAAAAAD7/wIAAQABAAEAAAA=")
tile_set = SubResource("TileSet_l6efi")

[connection signal="child_exiting_tree" from="." to="." method="_on_child_exiting_tree"]
