[gd_scene load_steps=15 format=3 uid="uid://1kreuo8tc4jv"]

[ext_resource type="PackedScene" uid="uid://bwe2jdmvinhqd" path="res://src/player/player.tscn" id="1_f3l4i"]
[ext_resource type="PackedScene" uid="uid://b6eg8t04rkh0c" path="res://src/props/wall_switch/wall_switch.tscn" id="2_eywuc"]
[ext_resource type="Script" uid="uid://cvx514gdjd5ev" path="res://src/world/meet_spook/meet_spook.gd" id="4_b6st5"]
[ext_resource type="PackedScene" uid="uid://8m6kh4f6pily" path="res://levels/meet_spook_test/debug_mob.tscn" id="5_cr4pm"]
[ext_resource type="Script" uid="uid://cisuvlqvqfqgo" path="res://src/world/meet_spook/meet_spook_spawner.gd" id="5_tak24"]
[ext_resource type="Script" uid="uid://c1gy2b2wcq127" path="res://levels/meet_spook_test/tween_debug.gd" id="6_cr4pm"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_eywuc"]

[sub_resource type="Sky" id="Sky_pka60"]
sky_material = SubResource("ProceduralSkyMaterial_eywuc")

[sub_resource type="Environment" id="Environment_nynr7"]
background_mode = 2
sky = SubResource("Sky_pka60")

[sub_resource type="PlaneMesh" id="PlaneMesh_b6st5"]
size = Vector2(50, 50)

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

[sub_resource type="BoxMesh" id="BoxMesh_nynr7"]
size = Vector3(0.5, 2, 0.5)

[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_b6st5"]
data = PackedVector3Array(-0.25, 1, 0.25, 0.25, 1, 0.25, -0.25, -1, 0.25, 0.25, 1, 0.25, 0.25, -1, 0.25, -0.25, -1, 0.25, 0.25, 1, -0.25, -0.25, 1, -0.25, 0.25, -1, -0.25, -0.25, 1, -0.25, -0.25, -1, -0.25, 0.25, -1, -0.25, 0.25, 1, 0.25, 0.25, 1, -0.25, 0.25, -1, 0.25, 0.25, 1, -0.25, 0.25, -1, -0.25, 0.25, -1, 0.25, -0.25, 1, -0.25, -0.25, 1, 0.25, -0.25, -1, -0.25, -0.25, 1, 0.25, -0.25, -1, 0.25, -0.25, -1, -0.25, 0.25, 1, 0.25, -0.25, 1, 0.25, 0.25, 1, -0.25, -0.25, 1, 0.25, -0.25, 1, -0.25, 0.25, 1, -0.25, -0.25, -1, 0.25, 0.25, -1, 0.25, -0.25, -1, -0.25, 0.25, -1, 0.25, 0.25, -1, -0.25, -0.25, -1, -0.25)

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

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

[node name="Player" parent="." instance=ExtResource("1_f3l4i")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.866025, -0.156955, -0.474726, 0.5, 0.271854, 0.82225, 0, -0.949453, 0.31391, 0, 0, 0)

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_nynr7")

[node name="WorldFloor" type="StaticBody3D" parent="." groups=["PlasticMaterial"]]

[node name="MeshInstance3D" type="MeshInstance3D" parent="WorldFloor"]
mesh = SubResource("PlaneMesh_b6st5")
skeleton = NodePath("../..")

[node name="CollisionShape3D" type="CollisionShape3D" parent="WorldFloor"]
shape = SubResource("WorldBoundaryShape3D_tak24")

[node name="TriggerPodium" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -2)

[node name="MeshInstance3D" type="MeshInstance3D" parent="TriggerPodium"]
mesh = SubResource("BoxMesh_nynr7")

[node name="CollisionShape3D" type="CollisionShape3D" parent="TriggerPodium"]
shape = SubResource("ConcavePolygonShape3D_b6st5")

[node name="TriggerSwitch" parent="TriggerPodium" instance=ExtResource("2_eywuc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0.35)
clean = true

[node name="Label3D" type="Label3D" parent="TriggerPodium"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0.3)
text = "GET SCARED"

[node name="MeetSpook" type="Marker3D" parent="." node_paths=PackedStringArray("spawners")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 1.5, 0)
script = ExtResource("4_b6st5")
mob_scene = ExtResource("5_cr4pm")
spawners = [NodePath("../MeetSpookSpawner"), NodePath("../MeetSpookSpawner2")]
metadata/_custom_type_script = "uid://cvx514gdjd5ev"

[node name="MeetSpookSpawner" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 6)
script = ExtResource("5_tak24")
metadata/_custom_type_script = "uid://cisuvlqvqfqgo"

[node name="Target" type="Marker3D" parent="MeetSpookSpawner"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 0, 0)

[node name="MeetSpookSpawner2" type="Marker3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9, 1.5, 0)
script = ExtResource("5_tak24")
metadata/_custom_type_script = "uid://cisuvlqvqfqgo"

[node name="Target" type="Marker3D" parent="MeetSpookSpawner2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 0, 0)

[node name="TweenDebug" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -4.5)
mesh = SubResource("SphereMesh_tak24")
script = ExtResource("6_cr4pm")

[connection signal="activated" from="TriggerPodium/TriggerSwitch" to="MeetSpook" method="prepare"]
[connection signal="activated" from="TriggerPodium/TriggerSwitch" to="TweenDebug" method="activate"]
