coffin slide

rose_physics
jonathan 2 months ago
parent d08d2ef817
commit 8083d5ca91

@ -0,0 +1,10 @@
extends Node3D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _on_interactable_on_hit() -> void:
animation_player.play("CoffinSlideFire")
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_left"):
animation_player.play("RESET")

@ -0,0 +1 @@
uid://b22xrvio2577x

@ -1,9 +1,10 @@
[gd_scene load_steps=38 format=3 uid="uid://157h04x0krfu"]
[gd_scene load_steps=42 format=3 uid="uid://157h04x0krfu"]
[ext_resource type="PackedScene" uid="uid://bjufextny1icg" path="res://models/UndertakerAssets.glb" id="1_7dqbv"]
[ext_resource type="ArrayMesh" uid="uid://iitrxdpdaq0i" path="res://models/ceiling.res" id="1_jn645"]
[ext_resource type="ArrayMesh" uid="uid://17chuhi8kh01" path="res://models/door.res" id="2_qvc4m"]
[ext_resource type="ArrayMesh" uid="uid://duokqbm5xp6mc" path="res://models/duct.res" id="3_7dqbv"]
[ext_resource type="PackedScene" uid="uid://be7u1kn41g2ww" path="res://addons/interaction/interactable.tscn" id="3_w68ji"]
[ext_resource type="ArrayMesh" uid="uid://bjt6sta5lnhjr" path="res://models/floor.res" id="4_ybpoa"]
[ext_resource type="PackedScene" uid="uid://bxuveo0hlwy33" path="res://prefabs/character.tscn" id="5_3j2fx"]
[ext_resource type="ArrayMesh" uid="uid://dj1dpmph88iyx" path="res://models/wall_lower.res" id="5_qtoah"]
@ -25,6 +26,8 @@
[ext_resource type="ArrayMesh" uid="uid://uos83uc5mxn7" path="res://models/coffin_upper.res" id="20_2ulci"]
[ext_resource type="Script" uid="uid://8bdjflc6ufvr" path="res://scenes/coffin_openable.gd" id="20_mc3m6"]
[ext_resource type="Script" uid="uid://bwmyjdcv3cvc" path="res://scenes/coffin_slide_out.gd" id="24_a5qmg"]
[ext_resource type="ArrayMesh" uid="uid://dtaqp7ru2gi8d" path="res://models/button.res" id="25_2ftkj"]
[ext_resource type="Script" uid="uid://b22xrvio2577x" path="res://scenes/coffin_slide_fire.gd" id="27_ny2il"]
[sub_resource type="BoxShape3D" id="BoxShape3D_vfrn5"]
size = Vector3(50, 1, 50)
@ -180,6 +183,8 @@ _data = {
&"RESET": SubResource("Animation_mc3m6")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_ny2il"]
[sub_resource type="Animation" id="Animation_yggoe"]
resource_name = "CoffinSlideFire"
length = 2.0
@ -197,6 +202,17 @@ tracks/0/keys = {
[sub_resource type="Animation" id="Animation_2ulci"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimParent:position:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.0005, 0, 0.0005, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kk8bn"]
_data = {
@ -368,6 +384,7 @@ libraries = {
[node name="CoffinSlideOut" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278)
visible = false
script = ExtResource("24_a5qmg")
[node name="Liftarms2" type="MeshInstance3D" parent="CoffinSlideOut"]
@ -393,9 +410,19 @@ transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.0
mesh = ExtResource("20_2ulci")
skeleton = NodePath("../../..")
[node name="Button" type="MeshInstance3D" parent="."]
transform = Transform3D(0, 1, 0, 0, 0, -1, -1, 0, 0, 3.0767944, 1.0443684, 1.5089626)
mesh = ExtResource("25_2ftkj")
skeleton = NodePath("")
[node name="Interactable" parent="Button" instance=ExtResource("3_w68ji")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Button/Interactable"]
shape = SubResource("SphereShape3D_ny2il")
[node name="CoffinSlideFire" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278)
visible = false
script = ExtResource("27_ny2il")
[node name="Liftarms2" type="MeshInstance3D" parent="CoffinSlideFire"]
transform = Transform3D(-4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 0, 0, 1, 1.9822427, 2.5227046, 0.550565)
@ -432,5 +459,6 @@ size = Vector3(10.249878, 4.5215454, 7.8151855)
data = ExtResource("19_jxwrd")
[connection signal="changed" from="Lever" to="CoffinOpenable" method="_on_lever_changed"]
[connection signal="on_hit" from="Button/Interactable" to="CoffinSlideFire" method="_on_interactable_on_hit"]
[editable path="UndertakerAssets"]

Loading…
Cancel
Save