Improved footstep detection

This commit is contained in:
2024-02-15 00:20:26 +01:00
parent 07f356a8cc
commit 17a507d07c
7 changed files with 86 additions and 39 deletions

View File

@ -0,0 +1,6 @@
extends SkillInstance
func _ready():
play_animation("human/thrust", 1.0, 2.0)
await melee_damage(0.5)
queue_free()

View File

@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="Skill" load_steps=3 format=3 uid="uid://1vmnijk8ap6b"]
[ext_resource type="PackedScene" uid="uid://cgycghadwb27h" path="res://skill/thrust/thrust.tscn" id="1_o6s8i"]
[ext_resource type="Script" path="res://skill/Skill.gd" id="2_g7hw0"]
[resource]
script = ExtResource("2_g7hw0")
id = "thrust"
name = "Thrust"
cooldown = 0.0
scene = ExtResource("1_o6s8i")

View File

@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://cgycghadwb27h"]
[ext_resource type="Script" path="res://skill/thrust/thrust.gd" id="1_jtbia"]
[ext_resource type="Script" path="res://skill/MeleeArea.gd" id="2_m3c5w"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_6if7n"]
radius = 0.7
height = 3.0
[node name="Thrust" type="Node3D"]
script = ExtResource("1_jtbia")
[node name="Area" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 256
monitoring = false
monitorable = false
script = ExtResource("2_m3c5w")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.7, 1.8)
shape = SubResource("CapsuleShape3D_6if7n")
[connection signal="body_entered" from="Area" to="Area" method="on_body_entered"]