keys and doors working
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=39 format=4 uid="uid://ddyfy6iosbgsj"]
|
||||
[gd_scene load_steps=47 format=4 uid="uid://ddyfy6iosbgsj"]
|
||||
|
||||
[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"]
|
||||
@@ -9,7 +9,7 @@
|
||||
[ext_resource type="Material" uid="uid://buv88wwtgorlx" path="res://assets/materials/prototype/mulch.tres" id="6_kw162"]
|
||||
[ext_resource type="PackedScene" uid="uid://drwae3loscbw7" path="res://assets/player.tscn" id="6_m8xxf"]
|
||||
[ext_resource type="PackedScene" uid="uid://20csd6dmwj4y" path="res://assets/jump_platform.tscn" id="8_grlcd"]
|
||||
[ext_resource type="Script" path="res://scripts/door.gd" id="10_08mbs"]
|
||||
[ext_resource type="Script" path="res://scripts/switch_door.gd" id="10_08mbs"]
|
||||
[ext_resource type="PackedScene" uid="uid://dy6uywh1duwxy" path="res://assets/switch.tscn" id="10_lktr8"]
|
||||
[ext_resource type="Script" path="res://levels/switchcontroller.gd" id="11_wstss"]
|
||||
[ext_resource type="Script" path="res://scripts/switch_interactandshoot.gd" id="12_yaq57"]
|
||||
@@ -18,6 +18,7 @@
|
||||
[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://dqnb5y6p04lpi" path="res://assets/key_1.tscn" id="18_ya2eo"]
|
||||
[ext_resource type="Script" path="res://scripts/key_door.gd" id="19_fiwww"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_y04oh"]
|
||||
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
|
||||
@@ -279,6 +280,67 @@ _data = {
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_vyys8"]
|
||||
radius = 0.505049
|
||||
|
||||
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rdueq"]
|
||||
data = PackedVector3Array(-2.375, 3.4025, 0.125, 2.375, 3.4025, 0.125, -2.375, -3.4025, 0.125, 2.375, 3.4025, 0.125, 2.375, -3.4025, 0.125, -2.375, -3.4025, 0.125, 2.375, 3.4025, -0.125, -2.375, 3.4025, -0.125, 2.375, -3.4025, -0.125, -2.375, 3.4025, -0.125, -2.375, -3.4025, -0.125, 2.375, -3.4025, -0.125, 2.375, 3.4025, 0.125, 2.375, 3.4025, -0.125, 2.375, -3.4025, 0.125, 2.375, 3.4025, -0.125, 2.375, -3.4025, -0.125, 2.375, -3.4025, 0.125, -2.375, 3.4025, -0.125, -2.375, 3.4025, 0.125, -2.375, -3.4025, -0.125, -2.375, 3.4025, 0.125, -2.375, -3.4025, 0.125, -2.375, -3.4025, -0.125, 2.375, 3.4025, 0.125, -2.375, 3.4025, 0.125, 2.375, 3.4025, -0.125, -2.375, 3.4025, 0.125, -2.375, 3.4025, -0.125, 2.375, 3.4025, -0.125, -2.375, -3.4025, 0.125, 2.375, -3.4025, 0.125, -2.375, -3.4025, -0.125, 2.375, -3.4025, 0.125, 2.375, -3.4025, -0.125, -2.375, -3.4025, -0.125)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_fd2rc"]
|
||||
size = Vector3(4.75, 6.805, 0.25)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jmej3"]
|
||||
resource_name = "open"
|
||||
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, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(4.43091, 3.29403, -50.9568), Vector3(4.43091, 9.85387, -50.9568)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w5uyq"]
|
||||
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(4.43091, 3.29403, -50.9568)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_12hts"]
|
||||
resource_name = "close"
|
||||
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, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(4.43091, 9.85387, -50.9568), Vector3(4.43091, 3.29403, -50.9568)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pobrj"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_w5uyq"),
|
||||
"close": SubResource("Animation_12hts"),
|
||||
"open": SubResource("Animation_jmej3")
|
||||
}
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_4andu"]
|
||||
size = Vector3(5.505, 7.07, 1.35)
|
||||
|
||||
[node name="Blockout3" type="Node3D" node_paths=PackedStringArray("player")]
|
||||
script = ExtResource("1_jjeos")
|
||||
player = NodePath("Player")
|
||||
@@ -346,7 +408,6 @@ gi_mode = 2
|
||||
mesh = SubResource("BoxMesh_6no40")
|
||||
script = ExtResource("10_08mbs")
|
||||
anim_player = NodePath("AnimationPlayer")
|
||||
door_open_start = true
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="Door1/Door"]
|
||||
|
||||
@@ -420,6 +481,35 @@ 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)
|
||||
|
||||
[node name="Door2" type="Node" parent="."]
|
||||
|
||||
[node name="Door" type="AnimatableBody3D" parent="Door2" node_paths=PackedStringArray("anim_player")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 4.43091, 3.29403, -50.9568)
|
||||
script = ExtResource("19_fiwww")
|
||||
anim_player = NodePath("AnimationPlayer")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Door2/Door"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.38419e-07, -1.90735e-06)
|
||||
shape = SubResource("ConcavePolygonShape3D_rdueq")
|
||||
|
||||
[node name="Door" type="MeshInstance3D" parent="Door2/Door"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00479889, -0.0307367, -0.0134363)
|
||||
mesh = SubResource("BoxMesh_fd2rc")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Door2/Door"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_pobrj")
|
||||
}
|
||||
|
||||
[node name="InteractArea" type="Area3D" parent="Door2/Door" groups=["interact"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="Door2/Door/InteractArea"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.38419e-07, -1.90735e-06)
|
||||
shape = SubResource("BoxShape3D_4andu")
|
||||
|
||||
[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/switch3/StaticBody3D" to="Door1/switch3" method="_on_static_body_3d_switch_hit"]
|
||||
|
||||
Reference in New Issue
Block a user