[gd_scene load_steps=20 format=2]

[ext_resource path="res://objects/bruh.gd" type="Script" id=1]
[ext_resource path="res://icon.png" type="Texture" id=2]
[ext_resource path="res://textures/guns/glock.png" type="Texture" id=3]
[ext_resource path="res://other/new_dynamicfont.tres" type="DynamicFont" id=4]
[ext_resource path="res://textures/player/gun.png" type="Texture" id=5]
[ext_resource path="res://textures/guns/arm.png" type="Texture" id=6]
[ext_resource path="res://textures/ui/lamp.png" type="Texture" id=7]
[ext_resource path="res://textures/ui/spoon.png" type="Texture" id=8]
[ext_resource path="res://textures/ui/faucet.png" type="Texture" id=9]
[ext_resource path="res://textures/ui/doorstop.png" type="Texture" id=11]
[ext_resource path="res://other/impact.ttf" type="DynamicFontData" id=12]
[ext_resource path="res://textures/ui/bean.png" type="Texture" id=13]

[sub_resource type="CylinderMesh" id=1]
radial_segments = 32
rings = 1

[sub_resource type="BoxShape" id=2]
extents = Vector3( 0.58, 0.901229, 0.621 )

[sub_resource type="SphereShape" id=3]
radius = 0.638833

[sub_resource type="DynamicFont" id=4]
size = 30
font_data = ExtResource( 12 )

[sub_resource type="DynamicFont" id=5]
size = 30
font_data = ExtResource( 12 )

[sub_resource type="DynamicFont" id=6]
size = 30
font_data = ExtResource( 12 )

[sub_resource type="BoxShape" id=7]
extents = Vector3( 0.698422, 0.221024, 0.884342 )

[node name="CircularMan" type="KinematicBody" groups=["entity", "player"]]
pause_mode = 1
script = ExtResource( 1 )

[node name="Lookingat" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, -0.707529 )
enabled = true
cast_to = Vector3( 0, 0, -2 )

[node name="CeilingCheck" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.416098, 1.69616, -0.494192 )
enabled = true
cast_to = Vector3( -1, 0, 1 )

[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 0.5, 0, 0, 0, 1, 0, 0, 0, 0.5, 0, 0, 0 )
mesh = SubResource( 1 )

[node name="Sprite3D" type="Sprite3D" parent="MeshInstance"]
transform = Transform( 0.0266357, 0, -0.999446, 0, 0.4, 0, 0.799556, 0, 0.0332947, 1.02931, 0.0540993, -1.06392 )
texture = ExtResource( 5 )

[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0998765, 0 )
shape = SubResource( 2 )

[node name="CollisionShape2" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.45619, 0 )
shape = SubResource( 3 )

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

[node name="Camera" type="Camera" parent="Head"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0.315027 )
current = true
far = 120.0

[node name="Position3D" type="Position3D" parent="Head/Camera"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1 )

[node name="CanvasLayer" type="CanvasLayer" parent="Head"]

[node name="DeathOverlay" type="ColorRect" parent="Head/CanvasLayer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 1, 0.0352941, 0.0352941, 0.223529 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TextureRect" type="TextureRect" parent="Head/CanvasLayer"]
self_modulate = Color( 0, 0, 0, 1 )
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 0.0541077
margin_top = -4.31818
margin_right = 64.0541
margin_bottom = 59.6818
rect_rotation = 45.0
rect_scale = Vector2( 0.1, 0.1 )
texture = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TextureRect2" type="TextureRect" parent="Head/CanvasLayer"]
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -290.0
margin_top = -222.0
margin_right = 267.0
margin_bottom = 309.0
rect_scale = Vector2( 0.45, 0.45 )
texture = ExtResource( 3 )

[node name="Hand" type="TextureRect" parent="Head/CanvasLayer"]
margin_left = 630.482
margin_top = 604.198
margin_right = 1627.48
margin_bottom = 1117.2
rect_scale = Vector2( 0.6, 0.6 )
rect_pivot_offset = Vector2( -200, 250 )
texture = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="HUD" type="VBoxContainer" parent="Head/CanvasLayer"]
anchor_top = 1.0
anchor_bottom = 1.0
margin_top = -40.0
margin_right = 40.0
grow_vertical = 0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Health" type="Label" parent="Head/CanvasLayer/HUD"]
margin_right = 226.0
margin_bottom = 62.0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_fonts/font = ExtResource( 4 )
text = "Health: 100"

[node name="Ammo" type="Label" parent="Head/CanvasLayer/HUD"]
margin_top = 66.0
margin_right = 226.0
margin_bottom = 128.0
custom_colors/font_color = Color( 1, 1, 1, 1 )
text = "Ammo: 0"

[node name="Position" type="Label" parent="Head/CanvasLayer"]
margin_right = 40.0
margin_bottom = 62.0
rect_scale = Vector2( 0.5, 0.5 )
text = "Position: 0x, 0y, 0z"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Prompt" type="HBoxContainer" parent="Head/CanvasLayer"]
visible = false
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -118.0
margin_top = 84.0
margin_right = 118.0
margin_bottom = 146.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="Head/CanvasLayer/Prompt"]
margin_left = 47.0
margin_top = 12.0
margin_right = 86.0
margin_bottom = 50.0
custom_fonts/font = SubResource( 4 )
text = "[E]: "

[node name="Label2" type="Label" parent="Head/CanvasLayer/Prompt"]
margin_left = 90.0
margin_top = 12.0
margin_right = 189.0
margin_bottom = 50.0
grow_horizontal = 2
grow_vertical = 2
custom_fonts/font = SubResource( 5 )
text = "Interact"

[node name="Text" type="ColorRect" parent="Head/CanvasLayer"]
visible = false
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -233.0
margin_top = -119.0
margin_right = 234.0
margin_bottom = 119.0
color = Color( 0, 0, 0, 0.647059 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="Head/CanvasLayer/Text"]
margin_left = 10.0
margin_top = 10.0
margin_right = 457.0
margin_bottom = 184.0
size_flags_horizontal = 3
size_flags_vertical = 5
custom_fonts/font = SubResource( 6 )
text = "This is test text"
autowrap = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label2" type="Label" parent="Head/CanvasLayer/Text"]
margin_left = 10.0
margin_top = 193.0
margin_right = 457.0
margin_bottom = 231.0
size_flags_horizontal = 3
size_flags_vertical = 5
custom_fonts/font = SubResource( 6 )
text = "Shoot to close"
align = 1
autowrap = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TopRight" type="VBoxContainer" parent="Head/CanvasLayer"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -239.0
margin_top = 10.0
margin_right = 518.0
margin_bottom = 334.0
rect_scale = Vector2( 0.3, 0.3 )
custom_constants/separation = 100
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Progress" type="HBoxContainer" parent="Head/CanvasLayer/TopRight"]
margin_right = 757.0
margin_bottom = 128.0
custom_constants/separation = 12
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="Head/CanvasLayer/TopRight/Progress"]
margin_right = 197.0
margin_bottom = 128.0
size_flags_vertical = 5
custom_fonts/font = ExtResource( 4 )
text = "Progress:"
valign = 1

[node name="spoon" type="TextureRect" parent="Head/CanvasLayer/TopRight/Progress"]
modulate = Color( 0, 0, 0, 1 )
margin_left = 209.0
margin_right = 337.0
margin_bottom = 128.0
texture = ExtResource( 8 )
stretch_mode = 3

[node name="faucet" type="TextureRect" parent="Head/CanvasLayer/TopRight/Progress"]
modulate = Color( 0, 0, 0, 1 )
margin_left = 349.0
margin_right = 477.0
margin_bottom = 128.0
texture = ExtResource( 9 )
stretch_mode = 3

[node name="lamp" type="TextureRect" parent="Head/CanvasLayer/TopRight/Progress"]
modulate = Color( 0, 0, 0, 1 )
margin_left = 489.0
margin_right = 617.0
margin_bottom = 128.0
texture = ExtResource( 7 )
stretch_mode = 3

[node name="doorstop" type="TextureRect" parent="Head/CanvasLayer/TopRight/Progress"]
modulate = Color( 0, 0, 0, 1 )
margin_left = 629.0
margin_right = 757.0
margin_bottom = 128.0
texture = ExtResource( 11 )
stretch_mode = 3

[node name="BeanIndicator" type="HBoxContainer" parent="Head/CanvasLayer/TopRight"]
margin_top = 228.0
margin_right = 757.0
margin_bottom = 324.0
alignment = 2

[node name="bean" type="TextureRect" parent="Head/CanvasLayer/TopRight/BeanIndicator"]
margin_left = 577.0
margin_right = 673.0
margin_bottom = 96.0
texture = ExtResource( 13 )
stretch_mode = 3

[node name="x" type="Label" parent="Head/CanvasLayer/TopRight/BeanIndicator"]
margin_left = 677.0
margin_top = 17.0
margin_right = 726.0
margin_bottom = 79.0
text = "  x "

[node name="bean_counter" type="Label" parent="Head/CanvasLayer/TopRight/BeanIndicator"]
margin_left = 730.0
margin_top = 17.0
margin_right = 757.0
margin_bottom = 79.0
text = "0"

[node name="Slap" type="Area" parent="Head" groups=["damage"]]

[node name="CollisionShape" type="CollisionShape" parent="Head/Slap"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.793306, -1.47714 )
shape = SubResource( 7 )
disabled = true

[node name="RayCast" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.846656, 0 )
enabled = true

[node name="Footstep" type="AudioStreamPlayer" parent="."]
volume_db = 18.0

[node name="Shot" type="AudioStreamPlayer" parent="."]
volume_db = 18.0

[node name="SFX" type="AudioStreamPlayer" parent="."]

[node name="Hurt" type="AudioStreamPlayer3D" parent="."]

[node name="ShootCooldown" type="Timer" parent="."]
wait_time = 0.5

[node name="SlapCooldown" type="Timer" parent="."]

[node name="Slapping" type="Timer" parent="."]
wait_time = 0.4
one_shot = true

[node name="YeetTimer" type="Timer" parent="."]
one_shot = true

[node name="DeathTimer" type="Timer" parent="."]

[node name="IFrameTimer" type="Timer" parent="."]
one_shot = true

[connection signal="body_entered" from="Head/Slap" to="." method="_on_Slap_body_entered"]
[connection signal="timeout" from="ShootCooldown" to="." method="_on_ShootCooldown_timeout"]
[connection signal="timeout" from="SlapCooldown" to="." method="_on_SlapCooldown_timeout"]
[connection signal="timeout" from="Slapping" to="." method="_on_Slapping_timeout"]
[connection signal="timeout" from="YeetTimer" to="." method="_on_YeetTimer_timeout"]
[connection signal="timeout" from="DeathTimer" to="." method="_on_DeathTimer_timeout"]
[connection signal="timeout" from="IFrameTimer" to="." method="_on_IFrameTimer_timeout"]
