started work on keys

This commit is contained in:
derek
2024-10-16 16:58:16 -05:00
parent c2b96e3ea6
commit fd0e69c4f1
10 changed files with 183 additions and 9 deletions

BIN
assets/Models/key1.blend Normal file

Binary file not shown.

View File

@@ -0,0 +1,51 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://2cgtn71r37rf"
path="res://.godot/imported/key1.blend-a04768fdc2c127b559f56a79a3f6c1e3.scn"
[deps]
source_file="res://assets/Models/key1.blend"
dest_files=["res://.godot/imported/key1.blend-a04768fdc2c127b559f56a79a3f6c1e3.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true

BIN
assets/Models/key1.blend1 Normal file

Binary file not shown.

76
assets/key_1.tscn Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=37 format=4 uid="uid://ddyfy6iosbgsj"] [gd_scene load_steps=39 format=4 uid="uid://ddyfy6iosbgsj"]
[ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_jjeos"] [ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_jjeos"]
[ext_resource type="PackedScene" uid="uid://b5eclfg0cmmal" path="res://assets/revolver_1.tscn" id="2_7dd4i"] [ext_resource type="PackedScene" uid="uid://b5eclfg0cmmal" path="res://assets/revolver_1.tscn" id="2_7dd4i"]
@@ -17,6 +17,7 @@
[ext_resource type="Script" path="res://scripts/switch_override.gd" id="15_0sc55"] [ext_resource type="Script" path="res://scripts/switch_override.gd" id="15_0sc55"]
[ext_resource type="PackedScene" uid="uid://chr8q10bxnrsa" path="res://assets/pressure_plate.tscn" id="15_e5ppe"] [ext_resource type="PackedScene" uid="uid://chr8q10bxnrsa" path="res://assets/pressure_plate.tscn" id="15_e5ppe"]
[ext_resource type="PackedScene" uid="uid://cnfc8rtk6l1d8" path="res://assets/crate1.tscn" id="16_cda17"] [ext_resource type="PackedScene" uid="uid://cnfc8rtk6l1d8" path="res://assets/crate1.tscn" id="16_cda17"]
[ext_resource type="PackedScene" uid="uid://dqnb5y6p04lpi" path="res://assets/key_1.tscn" id="18_ya2eo"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_y04oh"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_y04oh"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
@@ -40,6 +41,8 @@ glow_bloom = 0.75
fog_enabled = true fog_enabled = true
fog_density = 0.001 fog_density = 0.001
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_23vvh"]
[sub_resource type="NavigationMesh" id="NavigationMesh_0rpv6"] [sub_resource type="NavigationMesh" id="NavigationMesh_0rpv6"]
vertices = PackedVector3Array(3.37362, 0.377237, -39.2407, -2.12638, 0.377237, -39.4907, -3.37638, 0.377237, -39.2407, -3.37638, 0.377237, -20.7407, 3.37362, 0.377237, -20.7407, 2.12362, 0.627237, -2.49074, 2.37362, 0.627237, -1.49074, 3.12362, 0.627237, -0.990738, 19.1236, 0.377237, 0.00926208, 18.8736, 0.377237, -3.99074, 18.1236, 0.377237, -6.49074, 15.6236, 0.377237, -11.2407, -3.62638, 0.377237, -18.7407, -6.87638, 0.377237, -17.9907, -10.3764, 0.377237, -16.2407, -2.37638, 0.627237, -2.24074, -0.376375, 0.627237, -3.24074, 3.62362, 0.377237, -18.7407, 10.3736, 0.377237, -16.2407, 6.87362, 0.377237, -17.9907, 3.12362, 0.627237, 0.00926208, -17.8764, 0.377237, -7.24074, -18.8764, 0.377237, -3.99074, -19.1264, 0.377237, 0.00926208, -15.6264, 0.377237, -11.2407, -3.12638, 0.627237, 0.00926208, -0.376375, 0.127237, -2.24074, -1.37638, 0.377237, -1.99074, -2.12638, 0.127237, -0.740738, 2.12362, 0.127237, -0.740738, 1.37362, 0.377237, -1.99074, 0.373625, -0.122763, 2.00926, 1.87362, 0.377237, 1.50926, -0.376375, -0.122763, 2.00926, 1.99862, -0.122763, 0.384262, -1.87638, 0.377237, 1.50926, 0.623625, 0.627237, 3.00926, -0.626375, 0.627237, 3.00926, -1.12638, 0.377237, 19.0093, 1.12362, 0.377237, 19.0093, -7.37638, 0.377237, 17.7593, -3.37638, 0.377237, 19.0093, -18.8764, 0.377237, 4.00926, -17.8764, 0.377237, 7.25926, -14.3764, 0.377237, 12.7593, -2.37638, 0.627237, 2.25926, -11.3764, 0.377237, 15.5093, 3.37362, 0.377237, 19.0093, 6.87362, 0.377237, 18.0093, 17.8736, 0.377237, 7.25926, 18.8736, 0.377237, 4.00926, 2.37362, 0.627237, 2.25926, 14.3736, 0.377237, 12.7593, 11.3736, 0.377237, 15.5093, -8.87638, 217.627, 32.5093, -7.87638, 217.627, 32.5093, -7.62638, 217.627, 31.7593, -11.3764, 217.627, 15.7593, -9.12638, 217.627, 31.7593, 4.37362, 217.627, 31.7593, 4.37362, 217.627, 15.7593, -11.3764, 217.627, 31.7593, -3.37638, 27.8772, 20.0093, -3.37638, 27.8772, 38.5093, 3.37362, 27.8772, 38.5093, 3.37362, 27.8772, 20.0093, -9.12638, 217.627, 33.2593, -7.62638, 217.627, 33.2593, -11.3764, 217.627, 36.2593, -1.62638, 217.627, 36.2593, -1.37638, 217.627, 34.2593, 1.37362, 217.627, 34.2593, 1.62362, 217.627, 36.2593, 4.37362, 217.627, 36.2593, 4.37362, 217.627, 33.2593, -11.3764, 217.627, 33.2593) vertices = PackedVector3Array(3.37362, 0.377237, -39.2407, -2.12638, 0.377237, -39.4907, -3.37638, 0.377237, -39.2407, -3.37638, 0.377237, -20.7407, 3.37362, 0.377237, -20.7407, 2.12362, 0.627237, -2.49074, 2.37362, 0.627237, -1.49074, 3.12362, 0.627237, -0.990738, 19.1236, 0.377237, 0.00926208, 18.8736, 0.377237, -3.99074, 18.1236, 0.377237, -6.49074, 15.6236, 0.377237, -11.2407, -3.62638, 0.377237, -18.7407, -6.87638, 0.377237, -17.9907, -10.3764, 0.377237, -16.2407, -2.37638, 0.627237, -2.24074, -0.376375, 0.627237, -3.24074, 3.62362, 0.377237, -18.7407, 10.3736, 0.377237, -16.2407, 6.87362, 0.377237, -17.9907, 3.12362, 0.627237, 0.00926208, -17.8764, 0.377237, -7.24074, -18.8764, 0.377237, -3.99074, -19.1264, 0.377237, 0.00926208, -15.6264, 0.377237, -11.2407, -3.12638, 0.627237, 0.00926208, -0.376375, 0.127237, -2.24074, -1.37638, 0.377237, -1.99074, -2.12638, 0.127237, -0.740738, 2.12362, 0.127237, -0.740738, 1.37362, 0.377237, -1.99074, 0.373625, -0.122763, 2.00926, 1.87362, 0.377237, 1.50926, -0.376375, -0.122763, 2.00926, 1.99862, -0.122763, 0.384262, -1.87638, 0.377237, 1.50926, 0.623625, 0.627237, 3.00926, -0.626375, 0.627237, 3.00926, -1.12638, 0.377237, 19.0093, 1.12362, 0.377237, 19.0093, -7.37638, 0.377237, 17.7593, -3.37638, 0.377237, 19.0093, -18.8764, 0.377237, 4.00926, -17.8764, 0.377237, 7.25926, -14.3764, 0.377237, 12.7593, -2.37638, 0.627237, 2.25926, -11.3764, 0.377237, 15.5093, 3.37362, 0.377237, 19.0093, 6.87362, 0.377237, 18.0093, 17.8736, 0.377237, 7.25926, 18.8736, 0.377237, 4.00926, 2.37362, 0.627237, 2.25926, 14.3736, 0.377237, 12.7593, 11.3736, 0.377237, 15.5093, -8.87638, 217.627, 32.5093, -7.87638, 217.627, 32.5093, -7.62638, 217.627, 31.7593, -11.3764, 217.627, 15.7593, -9.12638, 217.627, 31.7593, 4.37362, 217.627, 31.7593, 4.37362, 217.627, 15.7593, -11.3764, 217.627, 31.7593, -3.37638, 27.8772, 20.0093, -3.37638, 27.8772, 38.5093, 3.37362, 27.8772, 38.5093, 3.37362, 27.8772, 20.0093, -9.12638, 217.627, 33.2593, -7.62638, 217.627, 33.2593, -11.3764, 217.627, 36.2593, -1.62638, 217.627, 36.2593, -1.37638, 217.627, 34.2593, 1.37362, 217.627, 34.2593, 1.62362, 217.627, 36.2593, 4.37362, 217.627, 36.2593, 4.37362, 217.627, 33.2593, -11.3764, 217.627, 33.2593)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 4), PackedInt32Array(2, 4, 3), PackedInt32Array(5, 7, 6), PackedInt32Array(9, 8, 10), PackedInt32Array(10, 8, 11), PackedInt32Array(11, 8, 7), PackedInt32Array(11, 7, 5), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 17), PackedInt32Array(14, 17, 16), PackedInt32Array(14, 16, 15), PackedInt32Array(19, 18, 17), PackedInt32Array(17, 18, 11), PackedInt32Array(17, 11, 5), PackedInt32Array(17, 5, 16), PackedInt32Array(4, 17, 3), PackedInt32Array(3, 17, 12), PackedInt32Array(8, 20, 7), PackedInt32Array(23, 22, 21), PackedInt32Array(24, 14, 21), PackedInt32Array(21, 14, 23), PackedInt32Array(23, 14, 15), PackedInt32Array(23, 15, 25), PackedInt32Array(28, 27, 26), PackedInt32Array(26, 30, 29), PackedInt32Array(31, 33, 32), PackedInt32Array(32, 33, 34), PackedInt32Array(34, 33, 29), PackedInt32Array(29, 33, 26), PackedInt32Array(26, 33, 28), PackedInt32Array(33, 35, 28), PackedInt32Array(31, 36, 33), PackedInt32Array(33, 36, 37), PackedInt32Array(37, 36, 39), PackedInt32Array(37, 39, 38), PackedInt32Array(38, 41, 40), PackedInt32Array(42, 23, 43), PackedInt32Array(43, 23, 44), PackedInt32Array(44, 23, 45), PackedInt32Array(45, 23, 25), PackedInt32Array(46, 44, 40), PackedInt32Array(40, 44, 38), PackedInt32Array(38, 44, 45), PackedInt32Array(38, 45, 37), PackedInt32Array(48, 47, 39), PackedInt32Array(50, 49, 8), PackedInt32Array(8, 49, 52), PackedInt32Array(8, 52, 51), PackedInt32Array(8, 51, 20), PackedInt32Array(53, 48, 52), PackedInt32Array(52, 48, 39), PackedInt32Array(52, 39, 51), PackedInt32Array(51, 39, 36), PackedInt32Array(54, 58, 55), PackedInt32Array(55, 58, 56), PackedInt32Array(56, 58, 57), PackedInt32Array(59, 56, 60), PackedInt32Array(60, 56, 57), PackedInt32Array(58, 61, 57), PackedInt32Array(65, 64, 62), PackedInt32Array(62, 64, 63), PackedInt32Array(55, 67, 54), PackedInt32Array(54, 67, 66), PackedInt32Array(66, 67, 68), PackedInt32Array(68, 67, 69), PackedInt32Array(69, 67, 70), PackedInt32Array(72, 71, 73), PackedInt32Array(73, 71, 74), PackedInt32Array(71, 70, 74), PackedInt32Array(74, 70, 67), PackedInt32Array(68, 75, 66)] polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 4), PackedInt32Array(2, 4, 3), PackedInt32Array(5, 7, 6), PackedInt32Array(9, 8, 10), PackedInt32Array(10, 8, 11), PackedInt32Array(11, 8, 7), PackedInt32Array(11, 7, 5), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 17), PackedInt32Array(14, 17, 16), PackedInt32Array(14, 16, 15), PackedInt32Array(19, 18, 17), PackedInt32Array(17, 18, 11), PackedInt32Array(17, 11, 5), PackedInt32Array(17, 5, 16), PackedInt32Array(4, 17, 3), PackedInt32Array(3, 17, 12), PackedInt32Array(8, 20, 7), PackedInt32Array(23, 22, 21), PackedInt32Array(24, 14, 21), PackedInt32Array(21, 14, 23), PackedInt32Array(23, 14, 15), PackedInt32Array(23, 15, 25), PackedInt32Array(28, 27, 26), PackedInt32Array(26, 30, 29), PackedInt32Array(31, 33, 32), PackedInt32Array(32, 33, 34), PackedInt32Array(34, 33, 29), PackedInt32Array(29, 33, 26), PackedInt32Array(26, 33, 28), PackedInt32Array(33, 35, 28), PackedInt32Array(31, 36, 33), PackedInt32Array(33, 36, 37), PackedInt32Array(37, 36, 39), PackedInt32Array(37, 39, 38), PackedInt32Array(38, 41, 40), PackedInt32Array(42, 23, 43), PackedInt32Array(43, 23, 44), PackedInt32Array(44, 23, 45), PackedInt32Array(45, 23, 25), PackedInt32Array(46, 44, 40), PackedInt32Array(40, 44, 38), PackedInt32Array(38, 44, 45), PackedInt32Array(38, 45, 37), PackedInt32Array(48, 47, 39), PackedInt32Array(50, 49, 8), PackedInt32Array(8, 49, 52), PackedInt32Array(8, 52, 51), PackedInt32Array(8, 51, 20), PackedInt32Array(53, 48, 52), PackedInt32Array(52, 48, 39), PackedInt32Array(52, 39, 51), PackedInt32Array(51, 39, 36), PackedInt32Array(54, 58, 55), PackedInt32Array(55, 58, 56), PackedInt32Array(56, 58, 57), PackedInt32Array(59, 56, 60), PackedInt32Array(60, 56, 57), PackedInt32Array(58, 61, 57), PackedInt32Array(65, 64, 62), PackedInt32Array(62, 64, 63), PackedInt32Array(55, 67, 54), PackedInt32Array(54, 67, 66), PackedInt32Array(66, 67, 68), PackedInt32Array(68, 67, 69), PackedInt32Array(69, 67, 70), PackedInt32Array(72, 71, 73), PackedInt32Array(73, 71, 74), PackedInt32Array(71, 70, 74), PackedInt32Array(74, 70, 67), PackedInt32Array(68, 75, 66)]
@@ -284,9 +287,10 @@ gun_2 = ExtResource("3_i5y5k")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ro14g") environment = SubResource("Environment_ro14g")
camera_attributes = SubResource("CameraAttributesPractical_23vvh")
[node name="Player" parent="." instance=ExtResource("6_m8xxf")] [node name="Player" parent="." instance=ExtResource("6_m8xxf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.281984, 218.696, 26.9567) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.281984, 28.8469, 30.8246)
AUDIO = false AUDIO = false
[node name="LightmapGI" type="LightmapGI" parent="."] [node name="LightmapGI" type="LightmapGI" parent="."]
@@ -342,6 +346,7 @@ gi_mode = 2
mesh = SubResource("BoxMesh_6no40") mesh = SubResource("BoxMesh_6no40")
script = ExtResource("10_08mbs") script = ExtResource("10_08mbs")
anim_player = NodePath("AnimationPlayer") anim_player = NodePath("AnimationPlayer")
door_open_start = true
[node name="StaticBody3D2" type="StaticBody3D" parent="Door1/Door"] [node name="StaticBody3D2" type="StaticBody3D" parent="Door1/Door"]
@@ -398,12 +403,22 @@ skeleton = NodePath("../..")
[node name="Crate1" parent="." instance=ExtResource("16_cda17")] [node name="Crate1" parent="." instance=ExtResource("16_cda17")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15.7658, 1.2863, -3.14915) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15.7658, 1.2863, -3.14915)
[node name="SpotLight3D" type="SpotLight3D" parent="."] [node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.0562737, 8.76623, -23.6633) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.27831, -29.0466)
light_energy = 16.0 light_energy = 5.0
light_size = 0.338 light_bake_mode = 1
spot_range = 12.99 shadow_enabled = true
spot_angle = 37.8106 omni_range = 16.0131
[node name="OmniLight3D2" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.154312, 8.17413, -60.8527)
light_energy = 5.0
light_bake_mode = 1
shadow_enabled = true
omni_range = 16.0131
[node name="Key1" parent="." instance=ExtResource("18_ya2eo")]
transform = Transform3D(1, 0, 0, 0, -0.0228967, -0.999738, 0, 0.999738, -0.0228967, 1.65768, 0.706259, -36.9888)
[connection signal="switch_hit" from="Door1/switch/StaticBody3D" to="Door1/switch" method="_on_static_body_3d_switch_hit"] [connection signal="switch_hit" from="Door1/switch/StaticBody3D" to="Door1/switch" method="_on_static_body_3d_switch_hit"]
[connection signal="switch_hit" from="Door1/switch2/StaticBody3D" to="Door1/switch2" method="_on_static_body_3d_switch_hit"] [connection signal="switch_hit" from="Door1/switch2/StaticBody3D" to="Door1/switch2" method="_on_static_body_3d_switch_hit"]

View File

@@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="First Person Test" config/name="First Person Test"
run/main_scene="res://levels/blockout_3.tscn" run/main_scene="res://assets/blockout_2.tscn"
config/features=PackedStringArray("4.3", "Forward Plus") config/features=PackedStringArray("4.3", "Forward Plus")
config/icon="res://icon.svg" config/icon="res://icon.svg"

19
scripts/key_pickup.gd Normal file
View File

@@ -0,0 +1,19 @@
extends RigidBody3D
@export_enum("Silver", "Gold", "Special") var key_type: int
@export var special_key_name : String
@export var collision_shape : Node
var pickupable = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
add_to_group("pickup")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func picked_up():
pass

13
scripts/key_resource.gd Normal file
View File

@@ -0,0 +1,13 @@
extends Resource
@export var key_name : String
@export_enum("silver", "boss", "special") var key_type: int
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass