[gd_scene load_steps=13 format=3 uid="uid://dl8pjf2esflbr"]

[ext_resource type="PackedScene" uid="uid://cersx8w4ps2sr" path="res://scenes/player.tscn" id="1_uum5p"]
[ext_resource type="PackedScene" uid="uid://cwrgvwx3lfwf6" path="res://assets/level.glb" id="2_i3oty"]
[ext_resource type="Script" path="res://src/interactable.ts" id="3_dt0nx"]
[ext_resource type="Script" path="res://src/interactable/door.ts" id="3_imxmk"]
[ext_resource type="Resource" uid="uid://5odv3n0dp2nn" path="res://resources/items/key.tres" id="4_3rynd"]
[ext_resource type="Script" path="res://src/item_pickup.ts" id="6_qe67v"]

[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_y41n8"]

[sub_resource type="BoxMesh" id="BoxMesh_crnh0"]

[sub_resource type="BoxShape3D" id="BoxShape3D_y1mmm"]

[sub_resource type="SphereMesh" id="SphereMesh_bketi"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_odc30"]
albedo_color = Color(1, 0, 0, 1)

[sub_resource type="SphereShape3D" id="SphereShape3D_v25bj"]

[node name="Node3D" type="Node3D"]

[node name="level" parent="." instance=ExtResource("2_i3oty")]

[node name="StaticBody3D" type="StaticBody3D" parent="level"]

[node name="CollisionShape3D" type="CollisionShape3D" parent="level/StaticBody3D"]
shape = SubResource("WorldBoundaryShape3D_y41n8")

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 8, 7)
projection = 1
size = 15.0
far = 50.0

[node name="Player" parent="." instance=ExtResource("1_uum5p")]

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 9, 0)

[node name="Door" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 1, 0)
script = ExtResource("3_imxmk")
locked = true
requires_key = true
key_item = ExtResource("4_3rynd")

[node name="MeshInstance3D" type="MeshInstance3D" parent="Door"]
mesh = SubResource("BoxMesh_crnh0")

[node name="Interactable" type="Area3D" parent="Door"]
monitoring = false
script = ExtResource("3_dt0nx")

[node name="CollisionShape3D" type="CollisionShape3D" parent="Door/Interactable"]
shape = SubResource("BoxShape3D_y1mmm")

[node name="Label3D" type="Label3D" parent="Door"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
billboard = 1
text = "door"
font_size = 128
outline_size = 32

[node name="Node3D" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -5)
script = ExtResource("6_qe67v")
resource = ExtResource("4_3rynd")

[node name="MeshInstance3D" type="MeshInstance3D" parent="Node3D"]
mesh = SubResource("SphereMesh_bketi")
surface_material_override/0 = SubResource("StandardMaterial3D_odc30")

[node name="Area3D" type="Area3D" parent="Node3D"]
script = ExtResource("3_dt0nx")

[node name="CollisionShape3D" type="CollisionShape3D" parent="Node3D/Area3D"]
shape = SubResource("SphereShape3D_v25bj")

[node name="Label3D" type="Label3D" parent="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
billboard = 1
text = "door key"
font_size = 128
outline_size = 32

[connection signal="interacted" from="Door/Interactable" to="Door" method="open"]
[connection signal="interacted" from="Node3D/Area3D" to="Node3D" method="add_to_inventory"]
