started work on doors and switches
This commit is contained in:
@@ -988,7 +988,7 @@ tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0.02, 0.03, 0.06),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 10.0, 0.0]
|
||||
"values": [0.0, 20.0, 0.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w02ee"]
|
||||
@@ -1179,13 +1179,13 @@ transform = Transform3D(4.17223e-07, 7.04731e-19, 2.10229, -2.98023e-07, -2.1022
|
||||
mesh = SubResource("ArrayMesh_0w43n")
|
||||
|
||||
[node name="Trigger" parent="revolver1" index="2"]
|
||||
transform = Transform3D(0.207537, -0.978227, 3.54117e-06, 0, -3.61999e-06, -1, 0.978227, 0.207537, -7.51281e-07, 0.226752, 0, -0.00209358)
|
||||
transform = Transform3D(-0.86282, -0.50551, 1.82994e-06, 0, -3.61999e-06, -1, 0.50551, -0.86282, 3.1234e-06, 0.226752, 0, -0.00209358)
|
||||
mesh = SubResource("ArrayMesh_ahftj")
|
||||
|
||||
[node name="flare" type="MeshInstance3D" parent="revolver1" index="3"]
|
||||
transform = Transform3D(-2.72424e-08, 0.381822, -1.11212e-08, 6.77626e-21, -1.66903e-08, -0.254424, -0.623234, -1.669e-08, 4.86124e-16, -0.109069, 0.0424353, -2.70625)
|
||||
visible = false
|
||||
transparency = 1.0
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_t14cq")
|
||||
skeleton = NodePath("")
|
||||
|
||||
@@ -1202,7 +1202,7 @@ target_position = Vector3(0, 0, -0.1)
|
||||
[node name="SpotLight3D" type="SpotLight3D" parent="revolver1" index="5"]
|
||||
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37115e-08, 0, 0, 0, 1, 0, 0, -1.94881)
|
||||
light_color = Color(0.965385, 0.844179, 0.572893, 1)
|
||||
light_energy = 0.0
|
||||
light_energy = 10.0
|
||||
light_projector = ExtResource("3_q41fl")
|
||||
light_size = 0.229
|
||||
shadow_enabled = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=31 format=4 uid="uid://ddyfy6iosbgsj"]
|
||||
[gd_scene load_steps=37 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"]
|
||||
@@ -350,6 +350,64 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_niymj")
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_6no40"]
|
||||
size = Vector3(8.3, 9.07, 0.25)
|
||||
|
||||
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_ep0aj"]
|
||||
points = PackedVector3Array(4.27131, 4.60698, 0.234921, -4.22115, -4.60698, -0.196984, -4.22115, -4.60698, 0.234921, -4.22115, 4.60698, -0.196984, 4.27131, -4.60698, -0.196984, 4.27131, -4.60698, 0.234921, -4.22115, 4.60698, 0.234921, 4.27131, 4.60698, -0.196984)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e7xa1"]
|
||||
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, 4.27403, -20.1043), Vector3(0, 13.305, -20.1043)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_euj1a"]
|
||||
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, 4.27403, -20.1043)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0gb2s"]
|
||||
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, 13.305, -20.1043), Vector3(0, 4.27403, -20.1043)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_66q6k"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_euj1a"),
|
||||
"close": SubResource("Animation_0gb2s"),
|
||||
"open": SubResource("Animation_e7xa1")
|
||||
}
|
||||
|
||||
[node name="Blockout3" type="Node3D" node_paths=PackedStringArray("player")]
|
||||
script = ExtResource("1_jjeos")
|
||||
player = NodePath("Player")
|
||||
@@ -416,3 +474,19 @@ jump_amount = 30
|
||||
|
||||
[node name="switch" parent="." instance=ExtResource("10_lktr8")]
|
||||
transform = Transform3D(1.655, 0, 0, 0, 1.655, 0, 0, 0, 1.655, 18.839, 24.696, 0)
|
||||
|
||||
[node name="Door1" type="Node" parent="."]
|
||||
|
||||
[node name="Door" type="MeshInstance3D" parent="Door1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.27403, -20.1043)
|
||||
mesh = SubResource("BoxMesh_6no40")
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="Door1/Door"]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Door1/Door/StaticBody3D2"]
|
||||
shape = SubResource("ConvexPolygonShape3D_ep0aj")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Door1/Door"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_66q6k")
|
||||
}
|
||||
|
||||
@@ -166,7 +166,6 @@ func _physics_process(delta):
|
||||
else:
|
||||
velocity.x = lerp(velocity.x, direction.x * speed, delta * 6.5) + (direction.x * DASH_SPEED)
|
||||
velocity.z = lerp(velocity.z, direction.z * speed, delta * 6.5) + (direction.z * DASH_SPEED)
|
||||
|
||||
elif is_climbing:
|
||||
gravity = 0.0
|
||||
if direction:
|
||||
|
||||
12
scripts/switch_basic.gd
Normal file
12
scripts/switch_basic.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Node
|
||||
|
||||
|
||||
|
||||
# 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
|
||||
Reference in New Issue
Block a user