door and interactable objects

pull/19/head
Sascha 2024-06-19 13:50:31 +07:00
parent 6a6e6d31d9
commit cd56513318
3 changed files with 39 additions and 37 deletions

@ -82,37 +82,6 @@ shadow_mesh = SubResource("ArrayMesh_mgfi8")
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_fm1vi"]
points = PackedVector3Array(1.28214, 2.77183, 0.115167, -0.17283, 0.017256, -0.1, -0.0705892, 0.414888, -0.234001, 1.8201, 0.0187016, -0.0999078, 1.3695, 1.24429, 0.42074, -0.157746, 2.37887, 0.115167, 1.45686, 1.375, -0.408625, -0.201525, -0.0218253, 0.115167, 0.191281, 2.72807, -0.103053, 1.7701, 2.34181, -0.0990543, 1.84966, -0.0215518, 0.115167, 1.84966, 2.16037, 0.115167, 1.45686, 2.72807, -0.103053, -0.16341, 2.17331, -0.0989978, 0.191281, 2.72807, 0.115167, -0.0642996, 0.465918, 0.192001, 0.0561265, 1.78695, -0.2, 1.71873, 0.414888, -0.234001, 1.45686, 1.33152, 0.42074, -0.0225848, 1.84756, 0.18327, 1.71873, 2.50985, 0.115167, 1.32592, 1.24429, -0.408625, 1.81193, 2.13148, -0.0990386, -0.201525, 2.20413, 0.115167, -0.0270111, 2.59709, 0.115167, 1.32592, 1.33152, -0.408625, 0.365996, 2.77183, 0.115167, 1.3695, 1.33152, 0.42074, 1.41328, 1.20053, -0.408625, -0.126766, 2.34719, -0.09961, 1.54421, 2.68405, 0.115167, 1.80608, 2.37859, 0.115167)
[sub_resource type="Animation" id="Animation_fivsa"]
resource_name = "open"
length = 1.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("wall_doorway/wall_doorway_door:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.7, 1.4985),
"transitions": PackedFloat32Array(2, -2, 0.5),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.131646, 0), Vector3(0, 1.5708, 0)]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SFX")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("3_x1qcj")
}],
"times": PackedFloat32Array(0)
}
tracks/1/use_blend = true
[sub_resource type="Animation" id="Animation_qym6j"]
length = 0.001
tracks/0/type = "value"
@ -155,6 +124,37 @@ tracks/1/keys = {
}
tracks/1/use_blend = true
[sub_resource type="Animation" id="Animation_fivsa"]
resource_name = "open"
length = 1.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("wall_doorway/wall_doorway_door:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.7, 1.4985),
"transitions": PackedFloat32Array(2, -2, 0.5),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.131646, 0), Vector3(0, 1.5708, 0)]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SFX")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("3_x1qcj")
}],
"times": PackedFloat32Array(0)
}
tracks/1/use_blend = true
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cw5ls"]
_data = {
"RESET": SubResource("Animation_qym6j"),

File diff suppressed because one or more lines are too long

@ -9,8 +9,10 @@ func _on_interact() -> void:
match state:
States.closed:
animation_player.play("open")
recalculate_navigation_map.emit(self)
States.closed:
animation_player.play("close")
recalculate_navigation_map.emit(self)
func _on_state_changed(new_state: States) -> void:
match new_state: