Add wall hit sound and animation

This commit is contained in:
2025-03-10 11:58:45 -07:00
parent d8c5bc8f78
commit 23049b3231
11 changed files with 189 additions and 47 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=60 format=4 uid="uid://cfecvvav8kkp6"]
[gd_scene load_steps=61 format=4 uid="uid://cfecvvav8kkp6"]
[ext_resource type="Script" uid="uid://yxmiqy7i0t7r" path="res://src/player/Player.cs" id="1_xcol5"]
[ext_resource type="Script" uid="uid://6edayafleq8y" path="res://src/hitbox/Hitbox.cs" id="2_lb3qc"]
@@ -96,16 +96,28 @@ tracks/1/keys = {
"values": [10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
[sub_resource type="Animation" id="Animation_uxo8q"]
resource_name = "explosion"
length = 3.66668
[sub_resource type="Animation" id="Animation_es4xk"]
resource_name = "hit_wall"
length = 0.3
step = 0.0833333
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("SwordSlashAnimation:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0833333, 0.166667),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [10, 1, 11]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_w8l8m"]
_data = {
&"RESET": SubResource("Animation_hcjph"),
&"attack": SubResource("Animation_0jjwv"),
&"explosion": SubResource("Animation_uxo8q")
&"hit_wall": SubResource("Animation_es4xk")
}
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d4v1j"]
@@ -465,6 +477,9 @@ animations = [{
"speed": 12.0
}]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_es4xk"]
height = 1.6909
[node name="Player" type="CharacterBody3D"]
collision_layer = 806
collision_mask = 775
@@ -564,3 +579,19 @@ spot_attenuation = 0.22
[node name="OmniLight3D2" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.65529, 0.471719)
[node name="WallCheck" type="RigidBody3D" parent="."]
unique_name_in_owner = true
collision_layer = 0
axis_lock_linear_x = true
axis_lock_linear_y = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
contact_monitor = true
max_contacts_reported = 100
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallCheck"]
transform = Transform3D(1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0.293308, 1.35803, -0.602638)
shape = SubResource("CapsuleShape3D_es4xk")