Player and Pause Menu have been setup

This commit is contained in:
2024-04-04 15:09:20 -05:00
commit 643be614c5
28 changed files with 901 additions and 0 deletions

View File

@ -0,0 +1,28 @@
extends Control
func _on_game_pause_button():
if $Settings.visible:
$Settings.hide()
$"Pause Menu".show()
elif $"Pause Menu".visible:
$"Pause Menu".hide()
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
else:
$"Pause Menu".show()
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
func _on_quit_pressed():
get_tree().quit()
func _on_resume_pressed():
hide()
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
func _on_settings_pressed():
$"Pause Menu".hide()
$"Settings".show()

View File

@ -0,0 +1,137 @@
[gd_scene load_steps=2 format=3 uid="uid://bwo6gvmi3jcqt"]
[ext_resource type="Script" path="res://Assets/components/Pause Screen.gd" id="1_tqif2"]
[node name="Menus" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_tqif2")
[node name="Pause Menu" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Pause Label" type="RichTextLabel" parent="Pause Menu"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -35.0
offset_right = 35.0
offset_bottom = 28.0
grow_horizontal = 2
text = "Paused"
[node name="Menu" type="VBoxContainer" parent="Pause Menu"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -35.0
offset_top = -50.5
offset_right = 35.0
offset_bottom = 50.5
grow_horizontal = 2
grow_vertical = 2
[node name="Resume" type="Button" parent="Pause Menu/Menu"]
layout_mode = 2
text = "Resume"
[node name="Settings" type="Button" parent="Pause Menu/Menu"]
layout_mode = 2
text = "Settings"
[node name="Quit" type="Button" parent="Pause Menu/Menu"]
layout_mode = 2
text = "Quit
"
[node name="Settings" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -23.0
offset_top = 42.0
offset_right = -23.0
offset_bottom = 42.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="Settings"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -20.0
offset_right = 20.0
offset_bottom = 23.0
grow_horizontal = 2
text = "Settings"
[node name="VBoxContainer" type="VBoxContainer" parent="Settings"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -223.0
offset_top = -430.5
offset_right = 223.0
offset_bottom = 430.5
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="Settings/VBoxContainer"]
custom_minimum_size = Vector2(0, 35)
layout_mode = 2
color = Color(0.184314, 0.184314, 0.184314, 1)
[node name="HSplitContainer" type="HSplitContainer" parent="Settings/VBoxContainer/ColorRect"]
layout_mode = 2
offset_top = 4.0
offset_right = 446.0
offset_bottom = 27.0
[node name="Label" type="Label" parent="Settings/VBoxContainer/ColorRect/HSplitContainer"]
layout_mode = 2
text = "Mouse Sensitity"
[node name="HSlider" type="HSlider" parent="Settings/VBoxContainer/ColorRect/HSplitContainer"]
layout_mode = 2
[node name="ColorRect2" type="ColorRect" parent="Settings/VBoxContainer"]
custom_minimum_size = Vector2(0, 35)
layout_mode = 2
color = Color(0.184314, 0.184314, 0.184314, 1)
[node name="HSplitContainer" type="HSplitContainer" parent="Settings/VBoxContainer/ColorRect2"]
layout_mode = 2
offset_top = 4.0
offset_right = 446.0
offset_bottom = 27.0
[node name="Label" type="Label" parent="Settings/VBoxContainer/ColorRect2/HSplitContainer"]
layout_mode = 2
text = "Joystick Sensativity"
[node name="HSlider" type="HSlider" parent="Settings/VBoxContainer/ColorRect2/HSplitContainer"]
layout_mode = 2
[connection signal="pressed" from="Pause Menu/Menu/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Pause Menu/Menu/Settings" to="." method="_on_settings_pressed"]
[connection signal="pressed" from="Pause Menu/Menu/Quit" to="." method="_on_quit_pressed"]

View File

@ -0,0 +1,22 @@
[gd_scene load_steps=5 format=3 uid="uid://er8qeqe4d466"]
[ext_resource type="Texture2D" uid="uid://db6enrh77cnbb" path="res://Assets/textures/wall_a.jpg" id="1_52lln"]
[sub_resource type="BoxShape3D" id="BoxShape3D_igcda"]
size = Vector3(5, 3.5, 0.2)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jo56m"]
albedo_texture = ExtResource("1_52lln")
[sub_resource type="BoxMesh" id="BoxMesh_ivu18"]
material = SubResource("StandardMaterial3D_jo56m")
size = Vector3(5, 3.5, 0.2)
[node name="StaticBody3D" type="StaticBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_igcda")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_ivu18")
skeleton = NodePath("../CollisionShape3D")

View File

@ -0,0 +1,47 @@
[gd_scene load_steps=5 format=3 uid="uid://bcjijcf8br8t4"]
[ext_resource type="Script" path="res://Assets/scripts/player.gd" id="1_b2ij4"]
[ext_resource type="Script" path="res://Assets/scripts/Head.gd" id="2_is0vo"]
[ext_resource type="Script" path="res://Assets/components/vapelight.gd" id="2_ndvgb"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_lm3xc"]
[node name="Player" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.999344, 0)
script = ExtResource("1_b2ij4")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_lm3xc")
[node name="Node3D" type="Node3D" parent="."]
script = ExtResource("2_is0vo")
[node name="Camera" type="Camera3D" parent="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.576, 0)
current = true
[node name="VapeLight" type="SpotLight3D" parent="Node3D"]
transform = Transform3D(1, 0, 0, 0, 0.934826, 0.355107, 0, -0.355107, 0.934826, 0.012711, 0.254978, 0.0294437)
light_color = Color(0.247059, 0.407843, 0.603922, 1)
spot_range = 5.368
spot_attenuation = 0.847127
spot_angle = 62.91
spot_angle_attenuation = 1.38495
script = ExtResource("2_ndvgb")
[node name="Severe Coughing Timer" type="Timer" parent="."]
wait_time = 10.0
[node name="Coughing Timer" type="Timer" parent="."]
wait_time = 3.0
[node name="Coughing Recovery" type="Timer" parent="."]
wait_time = 5.0
[node name="Severe Coughing Recovery" type="Timer" parent="."]
wait_time = 15.0
[connection signal="timeout" from="Severe Coughing Timer" to="." method="_on_severe_coughing_timer_timeout"]
[connection signal="timeout" from="Coughing Timer" to="." method="_on_coughing_timer_timeout"]
[connection signal="timeout" from="Coughing Recovery" to="." method="_on_coughing_recovery_timeout"]
[connection signal="timeout" from="Severe Coughing Recovery" to="." method="_on_severe_coughing_recovery_timeout"]

View File

@ -0,0 +1,23 @@
[gd_scene load_steps=5 format=3 uid="uid://dmbqijgut3s51"]
[ext_resource type="Texture2D" uid="uid://dlggbkhxijuy1" path="res://Assets/textures/Mountain brown rock seamless texture 2048x2048.jpg" id="1_rd1yx"]
[sub_resource type="BoxShape3D" id="BoxShape3D_2xgye"]
size = Vector3(10, 1, 10)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jb2bo"]
albedo_texture = ExtResource("1_rd1yx")
[sub_resource type="BoxMesh" id="BoxMesh_eip3x"]
material = SubResource("StandardMaterial3D_jb2bo")
size = Vector3(10, 1, 10)
[node name="Rock Floor" type="StaticBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.75, 0, 0)
shape = SubResource("BoxShape3D_2xgye")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.831642, 0, 0)
mesh = SubResource("BoxMesh_eip3x")

View File

@ -0,0 +1,23 @@
extends SpotLight3D
var Power = 0.0
var MaxPow = 6
var is_vaping = false
func _ready():
light_energy = 0
func _process(delta):
if is_vaping:
if light_energy < MaxPow:
light_energy += 1 * delta
else:
if light_energy > 0:
light_energy -= .50
func on():
is_vaping = true
func off():
is_vaping = false

View File

@ -0,0 +1,23 @@
[gd_scene load_steps=5 format=3 uid="uid://bkbhm2x07o5vd"]
[ext_resource type="Texture2D" uid="uid://dlggbkhxijuy1" path="res://Assets/textures/Mountain brown rock seamless texture 2048x2048.jpg" id="1_gkfw0"]
[sub_resource type="BoxShape3D" id="BoxShape3D_b1bm2"]
size = Vector3(10, 10, 1)
[sub_resource type="BoxMesh" id="BoxMesh_nsuje"]
size = Vector3(10, 10, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yyl1p"]
albedo_texture = ExtResource("1_gkfw0")
emission = Color(0.768627, 0.388235, 0.92549, 1)
[node name="StaticBody3D" type="StaticBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0809937, 0, 0)
shape = SubResource("BoxShape3D_b1bm2")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_nsuje")
surface_material_override/0 = SubResource("StandardMaterial3D_yyl1p")