added pause menu

This commit is contained in:
derek
2024-10-30 15:52:02 -05:00
parent 7c32586348
commit 0b3f46ae0f
14 changed files with 391 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=68 format=4 uid="uid://6agmt1hqlhww"]
[gd_scene load_steps=84 format=4 uid="uid://6agmt1hqlhww"]
[ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_sbpvn"]
[ext_resource type="PackedScene" uid="uid://brl0bsqjl5dg3" path="res://assets/mac_10.tscn" id="2_fn4vb"]
@@ -31,6 +31,10 @@
[ext_resource type="Texture2D" uid="uid://bervxllx4mjqe" path="res://assets/Textures/dickbutt.png" id="22_i7w8i"]
[ext_resource type="PackedScene" uid="uid://c7vrpfdh603kr" path="res://assets/bottle_1.tscn" id="23_khhfu"]
[ext_resource type="PackedScene" uid="uid://dvlpc0mrx16l" path="res://assets/table1.tscn" id="24_eaw7j"]
[ext_resource type="Script" path="res://levels/switchcontroller.gd" id="32_dncpy"]
[ext_resource type="Script" path="res://scripts/switch_door.gd" id="33_1m5er"]
[ext_resource type="Script" path="res://scripts/switch_interactandshoot.gd" id="35_ybetb"]
[ext_resource type="Script" path="res://levels/switch_target.gd" id="36_fuepo"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_eiud5"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
@@ -635,6 +639,114 @@ _surfaces = [{
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_02xub")
[sub_resource type="BoxMesh" id="BoxMesh_iy4xk"]
size = Vector3(11.605, 4.25, 0.61)
[sub_resource type="BoxShape3D" id="BoxShape3D_uer68"]
size = Vector3(9.26855, 4.28711, 0.640869)
[sub_resource type="Animation" id="Animation_d2bci"]
resource_name = "open"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 28.5934, 14.0814), Vector3(0, 32.6882, 14.0814)]
}
[sub_resource type="Animation" id="Animation_0aerp"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 28.5934, 14.0814)]
}
[sub_resource type="Animation" id="Animation_iqxx0"]
resource_name = "close"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 32.6882, 14.0814), Vector3(0, 28.5934, 14.0814)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_m24x1"]
_data = {
"RESET": SubResource("Animation_0aerp"),
"close": SubResource("Animation_iqxx0"),
"open": SubResource("Animation_d2bci")
}
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mpvpj"]
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission = Color(1, 0, 0, 1)
emission_energy_multiplier = 5.0
[sub_resource type="SphereMesh" id="SphereMesh_wh8x7"]
material = SubResource("StandardMaterial3D_mpvpj")
[sub_resource type="SphereShape3D" id="SphereShape3D_w8su1"]
radius = 0.505049
[sub_resource type="Animation" id="Animation_vx7i8"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(16.9397, 33.7018, 12.3882)]
}
[sub_resource type="Animation" id="Animation_xdrt1"]
resource_name = "movingswitch"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(16.9397, 33.7018, 12.3882), Vector3(16.9397, 33.7018, -21.8538), Vector3(-16.8287, 33.7018, -21.8538), Vector3(-16.8287, 33.7018, 11.5906), Vector3(16.9397, 33.7018, 12.3882)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_vwmy0"]
_data = {
"RESET": SubResource("Animation_vx7i8"),
"movingswitch": SubResource("Animation_xdrt1")
}
[node name="BLOCKOUT2Test" type="Node3D" node_paths=PackedStringArray("player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.016016, 0.0225029, -0.0192337)
script = ExtResource("1_sbpvn")
@@ -1592,3 +1704,45 @@ transform = Transform3D(-0.846676, 0, -0.532108, 0, 1, 0, 0.532108, 0, -0.846676
transform = Transform3D(0.015, -7.86969e-07, 2.74274e-07, 7.86945e-07, 0.015, 1.33284e-06, -2.74274e-07, -1.33283e-06, 0.015, -92.901, 0, 147.822)
mesh = SubResource("ArrayMesh_dt3jf")
skeleton = NodePath("")
[node name="Switch 1" type="Node" parent="." node_paths=PackedStringArray("door")]
script = ExtResource("32_dncpy")
door = NodePath("Door1")
[node name="Door1" type="MeshInstance3D" parent="Switch 1" node_paths=PackedStringArray("anim_player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 28.5934, 14.0814)
mesh = SubResource("BoxMesh_iy4xk")
skeleton = NodePath("")
script = ExtResource("33_1m5er")
anim_player = NodePath("AnimationPlayer")
[node name="StaticBody3D" type="StaticBody3D" parent="Switch 1/Door1"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Switch 1/Door1/StaticBody3D"]
shape = SubResource("BoxShape3D_uer68")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Switch 1/Door1"]
libraries = {
"": SubResource("AnimationLibrary_m24x1")
}
[node name="switch" type="MeshInstance3D" parent="Switch 1" groups=["interact", "switch"]]
transform = Transform3D(1.655, 0, 0, 0, 1.655, 0, 0, 0, 1.655, 16.9397, 33.7018, 12.3882)
mesh = SubResource("SphereMesh_wh8x7")
skeleton = NodePath("../..")
script = ExtResource("35_ybetb")
[node name="StaticBody3D" type="StaticBody3D" parent="Switch 1/switch" groups=["interact", "switch"]]
collision_layer = 3
script = ExtResource("36_fuepo")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Switch 1/switch/StaticBody3D"]
shape = SubResource("SphereShape3D_w8su1")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Switch 1/switch"]
libraries = {
"": SubResource("AnimationLibrary_vwmy0")
}
autoplay = "movingswitch"
[connection signal="switch_hit" from="Switch 1/switch/StaticBody3D" to="Switch 1/switch" method="_on_static_body_3d_switch_hit"]

View File

@@ -49,10 +49,10 @@ blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_dtlcm")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_x6v7s"]
albedo_color = Color(0.26779, 0.26779, 0.26779, 1)
metallic = 1.0
emission = Color(0.944624, 0.755365, 0, 1)
emission_energy_multiplier = 8.0
emission_enabled = true
emission = Color(1, 0.607843, 0.364706, 1)
emission_energy_multiplier = 4.0
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_3wvag"]
direction = Vector3(0, 0, 1)
@@ -60,7 +60,7 @@ initial_velocity_min = 3.0
initial_velocity_max = 5.0
[sub_resource type="BoxMesh" id="BoxMesh_qy3jk"]
size = Vector3(0.05, 0.05, 0.05)
size = Vector3(0.025, 0.025, 0.025)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ywt21"]
transparency = 1
@@ -79,7 +79,7 @@ radius = 0.055
[node name="Bullet" type="RigidBody3D"]
top_level = true
collision_layer = 32
collision_layer = 0
collision_mask = 109
axis_lock_angular_x = true
axis_lock_angular_y = true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://drwae3loscbw7"]
[gd_scene load_steps=25 format=3 uid="uid://drwae3loscbw7"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_x7wms"]
[ext_resource type="PackedScene" uid="uid://dcmno6wafk5hg" path="res://assets/dead_player.tscn" id="2_4hoys"]
@@ -15,6 +15,7 @@
[ext_resource type="AudioStream" uid="uid://bl8yg1d3bsxs3" path="res://assets/Audio/constant-natural-strong-wind-looping-SBA-300062687.wav" id="11_he7p5"]
[ext_resource type="AudioStream" uid="uid://cy150nsjqp7lt" path="res://assets/Audio/grunt-male-SBA-300282985.wav" id="12_f51u4"]
[ext_resource type="AudioStream" uid="uid://cwre1dq8gsvbg" path="res://assets/Audio/Foley Sports/Boxing/Gloves Block Intense.wav" id="12_qhd01"]
[ext_resource type="PackedScene" uid="uid://cfbwx2fsdp0b3" path="res://pause_menu.tscn" id="13_xrfwr"]
[ext_resource type="AudioStream" uid="uid://t50i483xmj3a" path="res://assets/Audio/Weapons/toy-click-spin-SBA-300071143.wav" id="14_pnsbm"]
[ext_resource type="AudioStream" uid="uid://c1e6vr2hndho7" path="res://assets/Audio/Weapons/Misc (Ammo Boxes, Holsters, Etc)/Kydex Unholster 002.wav" id="17_1fyjm"]
@@ -41,7 +42,7 @@ radius = 7.0
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_holder") groups=["player"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.11359, 0)
collision_layer = 11
collision_layer = 6
collision_mask = 11
script = ExtResource("1_x7wms")
dead_player = ExtResource("2_4hoys")
@@ -156,6 +157,10 @@ collide_with_areas = true
[node name="Kick" type="AudioStreamPlayer3D" parent="Head/Recoil/Camera3D/Audio"]
stream = ExtResource("12_qhd01")
[node name="PauseMenu" parent="Head/Recoil/Camera3D" instance=ExtResource("13_xrfwr")]
offset_right = 0.0
offset_bottom = 0.0
[node name="pick_up_detection" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 16

View File

@@ -1081,7 +1081,7 @@ recoil_amount = Vector3(0.5, 0.1, 0.1)
max_ammo = 6
bullet_damage = 5
bullet_force_mod = 10
bullet_speed = 1200
bullet_speed = 1500
bullet_drop = 0.0
random_spread_amt = 0.1
chamber = NodePath("revolver1/Chamber")