[gd_scene load_steps=25 format=2]

[ext_resource path="res://scripts/Main.gd" type="Script" id=1]
[ext_resource path="res://ControlButton.gd" type="Script" id=2]
[ext_resource path="res://Bakery.tscn" type="PackedScene" id=3]
[ext_resource path="res://default_env.tres" type="Environment" id=4]
[ext_resource path="res://building_segment.tscn" type="PackedScene" id=5]
[ext_resource path="res://Security.tscn" type="PackedScene" id=6]
[ext_resource path="res://Player.tscn" type="PackedScene" id=7]
[ext_resource path="res://Head.tscn" type="PackedScene" id=8]
[ext_resource path="res://Pads.tscn" type="PackedScene" id=9]
[ext_resource path="res://exported_models/sky.obj" type="ArrayMesh" id=10]
[ext_resource path="res://scripts/sky.gd" type="Script" id=11]
[ext_resource path="res://music/Sad-Chill.ogg" type="AudioStream" id=12]
[ext_resource path="res://Security Booth.tscn" type="PackedScene" id=13]
[ext_resource path="res://scripts/Fader.gd" type="Script" id=14]
[ext_resource path="res://scripts/LOADER.gd" type="Script" id=15]
[ext_resource path="res://Clock.tscn" type="PackedScene" id=16]
[ext_resource path="res://controls_hub.gd" type="Script" id=17]
[ext_resource path="res://scripts/FloorPath.gd" type="Script" id=18]

[sub_resource type="PlaneMesh" id=1]

[sub_resource type="SpatialMaterial" id=2]

[sub_resource type="ConcavePolygonShape" id=3]
data = PoolVector3Array( 1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, -1, 1, 0, -1 )

[sub_resource type="Shader" id=4]
code = "shader_type spatial;

void fragment(){
	
	if (cos(UV.x*30.0)>0.8){
		EMISSION.rgb = vec3(1,1,1);
		}
	else{EMISSION.rgb = vec3(0,0,0);
	}
}"

[sub_resource type="ShaderMaterial" id=5]
shader = SubResource( 4 )

[sub_resource type="Curve3D" id=6]
_data = {
"points": PoolVector3Array( 0, 0, 0, 0, 0, 0, 1.56442, 0, 0.562141, 0, 0, 0, 0, 0, 0, 1.78186, 0, 2.92422, 0, 0, 0, 0, 0, 0, 2.03759, 0, 4.28392, 0, 0, 0, 0, 0, 0, 2.2801, 0, 5.45225, 0, 0, 0, 0, 0, 0, 2.60685, 0, 6.38369, 0, 0, 0, 0, 0, 0, 2.72133, 0, 7.36929, 0, 0, 0, 0, 0, 0, 2.37589, 0, 8.24181, 0, 0, 0, 0, 0, 0, 2.2968, 0, 8.97753 ),
"tilts": PoolRealArray( 0, 0, 0, 0, 0, 0, 0, 0 )
}

[node name="MAIN" type="Spatial"]
transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0 )
script = ExtResource( 1 )

[node name="Agipoint" type="Spatial" parent="."]
transform = Transform( -0.757321, 0, 0.653043, 0, 1, 0, -0.653043, 0, -0.757321, 0.960469, 0, 5.94148 )

[node name="PriestPoint" type="Spatial" parent="."]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.112155, 0, 9.83122 )

[node name="building_segment" parent="." instance=ExtResource( 5 )]

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource( 4 )

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

[node name="Floor" type="MeshInstance" parent="."]
transform = Transform( 5, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 5.98561 )
mesh = SubResource( 1 )
material/0 = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}

[node name="StaticBody" type="StaticBody" parent="Floor"]

[node name="CollisionShape" type="CollisionShape" parent="Floor/StaticBody"]
shape = SubResource( 3 )

[node name="StaticBody2" type="StaticBody" parent="Floor"]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -1 )

[node name="CollisionShape" type="CollisionShape" parent="Floor/StaticBody2"]
shape = SubResource( 3 )

[node name="StaticBody3" type="StaticBody" parent="Floor"]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0.9 )

[node name="CollisionShape" type="CollisionShape" parent="Floor/StaticBody3"]
shape = SubResource( 3 )

[node name="Head" parent="." instance=ExtResource( 8 )]
transform = Transform( -1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 6 )

[node name="sky" type="MeshInstance" parent="."]
transform = Transform( 100, 0, 0, 0, 200, 0, 0, 0, 100, 0.766, 304.268, 5.436 )
mesh = ExtResource( 10 )
material/0 = SubResource( 5 )
script = ExtResource( 11 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.35054, 6.14762 )
stream = ExtResource( 12 )
unit_db = -6.465
unit_size = 0.1
autoplay = true
attenuation_filter_db = -50.0

[node name="Bakery" parent="." instance=ExtResource( 3 )]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2, 0, 11 )

[node name="Pads1" parent="." instance=ExtResource( 9 )]

[node name="Pads2" parent="." instance=ExtResource( 9 )]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -4.523, 0, 5.427 )

[node name="SecurityBooth" parent="." instance=ExtResource( 13 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5932, 0, 0 )

[node name="Clock" parent="." instance=ExtResource( 16 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.03599, 1.7421, 1.28226 )

[node name="Trajectories" type="Spatial" parent="."]

[node name="SecurityPath1" type="Path" parent="Trajectories"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.185233, 0, -0.727172 )
curve = SubResource( 6 )
script = ExtResource( 18 )

[node name="PathFollow" type="PathFollow" parent="Trajectories/SecurityPath1"]
transform = Transform( 0.999999, 0, 0, 0, 1, 0, 0, 0, 0.999999, 1.5723, 0, 0.647755 )
offset = 0.0859791
rotation_mode = 1
cubic_interp = false
loop = false

[node name="SECURITY" parent="Trajectories/SecurityPath1/PathFollow" instance=ExtResource( 6 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 0, 0 )

[node name="Spatial" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.25766, 0, 4.88154 )

[node name="Point1" type="Spatial" parent="."]
transform = Transform( 0.999781, 0, -0.020956, 0, 1, 0, 0.020956, 0, 0.999781, 0.377491, 0, 2.47218 )

[node name="Point2" type="Spatial" parent="."]
transform = Transform( -0.993192, 0, 0.116491, 0, 1, 0, -0.116491, 0, -0.993192, -1.36505, 0, 7.95729 )

[node name="Point3" type="Spatial" parent="."]
transform = Transform( -0.993192, 0, 0.116491, 0, 1, 0, -0.116491, 0, -0.993192, -0.16572, 0, 8.96733 )

[node name="TRANSIT1" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.689893, 0, 3.75216 )

[node name="TRANSIT2" type="Spatial" parent="."]
transform = Transform( -1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, -0.0208523, 0, 7.9356 )

[node name="Camera" type="Camera" parent="."]
transform = Transform( 10, 0, 0, 0, -4.37114e-07, 10, 0, -10, -4.37114e-07, 0, 10.4735, 5.33271 )

[node name="FADER" type="Polygon2D" parent="."]
position = Vector2( 0, 71.0034 )
scale = Vector2( 7.4, 5.01906 )
color = Color( 0, 0, 0, 1 )
polygon = PoolVector2Array( -392.571, -191.411, 196.429, -209.411, 669.837, -208.411, 1173.95, -187.411, 1374.51, -133.154, 1401.51, 675.482, 952.514, 911.325, -178.367, 821.325, -631.711, 580.637, -655.6, 21.0496, -505.91, -84.9504 )
script = ExtResource( 14 )

[node name="LOADER" type="Label" parent="."]
margin_right = 68.0
margin_bottom = 14.0
text = "something"
script = ExtResource( 15 )
__meta__ = {
"_edit_use_anchors_": true
}

[node name="controls" type="Node2D" parent="."]
position = Vector2( 147.907, 126.407 )
scale = Vector2( 0.0658222, 0.064034 )
script = ExtResource( 17 )

[node name="S" type="Button" parent="controls"]
margin_left = -396.656
margin_top = 856.915
margin_right = -358.656
margin_bottom = 876.915
rect_scale = Vector2( 21.2726, 28.9778 )
text = "S"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
action = "ui_down"

[node name="A" type="Button" parent="controls"]
margin_left = -1470.28
margin_top = -260.814
margin_right = -1432.28
margin_bottom = -240.814
rect_scale = Vector2( 21.2726, 28.9778 )
text = "A"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
action = "ui_left"

[node name="W" type="Button" parent="controls"]
margin_left = -406.074
margin_top = -1294.97
margin_right = -368.074
margin_bottom = -1274.97
rect_scale = Vector2( 21.2726, 28.9778 )
text = "W"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="E" type="Button" parent="controls"]
margin_left = -358.985
margin_top = -239.922
margin_right = -320.985
margin_bottom = -219.922
rect_scale = Vector2( 21.2726, 28.9778 )
text = "E"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
action = "interact"

[node name="D" type="Button" parent="controls"]
margin_left = 771.148
margin_top = -208.583
margin_right = 809.148
margin_bottom = -188.583
rect_scale = Vector2( 21.2726, 28.9778 )
text = "D"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
action = "ui_right"
