From f97f2d73ba6c72fc851dd04ac8d8512b3e1c631f Mon Sep 17 00:00:00 2001 From: chendian <-> Date: Mon, 27 Jan 2025 10:14:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/attack/sharp_normal_hit_down.tres | 2 +- resource/skill_animation/hero01_long_skill03.tres | 6 +++--- scene/effect/particle/hero01_long_air_skill01.tscn | 8 ++++++-- script/character/move.gd | 2 +- script/character/skill.gd | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/config/attack/sharp_normal_hit_down.tres b/config/attack/sharp_normal_hit_down.tres index 9af5d7c..83ffb3a 100644 --- a/config/attack/sharp_normal_hit_down.tres +++ b/config/attack/sharp_normal_hit_down.tres @@ -12,7 +12,7 @@ is_floating = true is_rebound = false is_throw_check = false is_throw_end = false -hit_back_speed = 1.0 +hit_back_speed = 0.0 hit_up_speed = -10.0 hit_back_duration = 0.05 hit_up_duration = 0.05 diff --git a/resource/skill_animation/hero01_long_skill03.tres b/resource/skill_animation/hero01_long_skill03.tres index 88f59b8..08bcb24 100644 --- a/resource/skill_animation/hero01_long_skill03.tres +++ b/resource/skill_animation/hero01_long_skill03.tres @@ -37,7 +37,7 @@ tracks/2/path = NodePath("Status:break_level") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { -"times": PackedFloat32Array(0, 0.3, 0.5), +"times": PackedFloat32Array(0, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1), "update": 1, "values": [0, 3, 4] @@ -61,10 +61,10 @@ tracks/4/path = NodePath("Status:skill_move_speed") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { -"times": PackedFloat32Array(0.1, 0.2), +"times": PackedFloat32Array(0, 0.2), "transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [6.0, 0.0] +"values": [5.0, 0.0] } tracks/5/type = "method" tracks/5/imported = false diff --git a/scene/effect/particle/hero01_long_air_skill01.tscn b/scene/effect/particle/hero01_long_air_skill01.tscn index eab1c11..dd43cd6 100644 --- a/scene/effect/particle/hero01_long_air_skill01.tscn +++ b/scene/effect/particle/hero01_long_air_skill01.tscn @@ -1,6 +1,10 @@ -[gd_scene load_steps=2 format=3 uid="uid://cxecnqr1dnb7r"] +[gd_scene load_steps=3 format=3 uid="uid://cxecnqr1dnb7r"] +[ext_resource type="Script" uid="uid://dxoik7jm7xm2q" path="res://script/effect/particle.gd" id="1_15uh7"] [ext_resource type="PackedScene" uid="uid://c2uyg7ktya04f" path="res://scene/effect/particle/_particle_slash2.tscn" id="1_oea3n"] -[node name="Particle" instance=ExtResource("1_oea3n")] +[node name="Particle" type="Node3D"] +script = ExtResource("1_15uh7") + +[node name="Particle" parent="." instance=ExtResource("1_oea3n")] transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) diff --git a/script/character/move.gd b/script/character/move.gd index 6d6e21f..1f3524c 100644 --- a/script/character/move.gd +++ b/script/character/move.gd @@ -130,7 +130,6 @@ func update_move_check(delta) -> bool: if status.is_stagger: if normal_speed < -6 and normal.y >= 0 and not buff.has_buff("hit_ground_cd"): #墙体互动 - buff.add_buff("hit_ground_cd", 0.1) Global.effect_mgr.cast_particle(ResourceManager.particle_hit_ground_heavy, character.pos(), normal) var velocity_new: Vector3 = velocity - normal * normal_speed * 2 var attack_dir: Vector2 = Vector2(velocity_new.x, velocity_new.z).normalized() @@ -140,6 +139,7 @@ func update_move_check(delta) -> bool: attack_info.attack_box = ResourceManager.cfg_attack_box_rebound attack_info.attack_dir = attack_dir battle.add_attack(attack_info) + buff.add_buff("hit_ground_cd", 0.1) elif normal_speed <-3: #反弹 Global.effect_mgr.cast_particle(ResourceManager.particle_hit_ground_normal, character.pos(), normal) diff --git a/script/character/skill.gd b/script/character/skill.gd index 5c6f5be..f228ad3 100644 --- a/script/character/skill.gd +++ b/script/character/skill.gd @@ -224,10 +224,11 @@ func _frame_forward() -> void: func _frame_back(frame_offset: int) -> void: if not current_animation: return - var frame: int = int(current_animation_position / Setting.animation_frame_rate) - frame_offset + var frame: int = int((current_animation_position + 0.001) / Setting.animation_frame_rate) - frame_offset frame = max(0, frame) var frame_pos: float = frame * Setting.animation_frame_rate - seek(frame_pos + 0.01, true, true) + print(current_animation_position, "->", frame_pos, "->", frame, "->", frame_offset) + seek(frame_pos- Setting.animation_frame_rate * 0.8, true, true) func on_cast_sub_character() -> void: