03拳套 基础攻击动画迭代

master
chendian 1 year ago
parent 1ec22859fb
commit d66aa2a08d

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@ -85,6 +85,6 @@ tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"update": 0,
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}

@ -21,7 +21,7 @@
[ext_resource type="Script" path="res://script/manager/item_manager.gd" id="12_xwufn"]
[ext_resource type="Script" path="res://script/character/status.gd" id="18_nr8sb"]
[ext_resource type="SpriteFrames" uid="uid://2cb8lknel0ih" path="res://resource/animation/character/basic_move.aseprite" id="20_4ni1a"]
[ext_resource type="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="21_kj50v"]
[ext_resource type="SpriteFrames" uid="uid://bvnjq6vtioip" path="res://resource/animation/character/hero01_fist_skill02.aseprite" id="21_ngr2y"]
[ext_resource type="AnimationLibrary" uid="uid://croik07a1qko5" path="res://resource/skill_animation_library/animation_library.tres" id="22_qyapv"]
[ext_resource type="Script" path="res://script/character/skill.gd" id="23_783eu"]
[ext_resource type="Script" path="res://script/character/move.gd" id="25_d520l"]
@ -223,12 +223,13 @@ pixel_size = 0.02
double_sided = false
alpha_cut = 2
texture_filter = 0
sprite_frames = ExtResource("21_kj50v")
animation = &"fist_skill02"
sprite_frames = ExtResource("21_ngr2y")
animation = &"fist_skill_charging"
frame = 9
[node name="Throw" type="AnimatedSprite3D" parent="EditorTool/Character"]
unique_name_in_owner = true
transform = Transform3D(-1, 0, 0, 0, -1, 1.50996e-07, 0, -1.50996e-07, -1, 0, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, 0, 0, 0)
pixel_size = 0.02
sprite_frames = ExtResource("20_4ni1a")
animation = &"idle_loop"

@ -86,13 +86,15 @@ func update_move(delta):
func update_deformation(delta):
var velocity_change_x: float = status.velocity_change.x
var velocity_change_y: float = status.velocity_change.y + status.velocity_change.z
var dir_x: int = 1 if (velocity_change_x > 1) or (velocity_change_y < -1) else 0
var dir_y: int = 1 if (velocity_change_y > 1) or (velocity_change_x < -1) else 0
if dir_x or dir_y:
status.deformation_dir=Vector2(dir_x, dir_y)
character.add_buff("deformation", 0.2)
var velocity_change_sum: float = status.velocity_change.x + status.velocity_change.y + status.velocity_change.z
if velocity_change_sum > 6:
var velocity_change_x: float = status.velocity_change.x
var velocity_change_y: float = status.velocity_change.y + status.velocity_change.z
var dir_x: int = 1 if (velocity_change_x > 1) or (velocity_change_y < -1) else 0
var dir_y: int = 1 if (velocity_change_y > 1) or (velocity_change_x < -1) else 0
if dir_x or dir_y:
status.deformation_dir=Vector2(dir_x, dir_y)
character.add_buff("deformation", 0.2)
func update_move_effect(delta):

@ -113,6 +113,7 @@ func cast_skill(cfg: SkillCfg, cast_dir: Vector2, action_key: String = ""):
var animation_name: String = "animation_library/%s" % cfg.get_res_name()
play(animation_name, -1, Setting.animation_speed_scale)
seek(0, true, true)
func break_skill():
@ -162,7 +163,7 @@ func on_check_ground(frame_offset: int) -> void:
# 落地检测成功时跳帧
_frame_forward()
else:
_frame_back(frame_offset + 1)
_frame_back(frame_offset)
func on_check_charging(charging_level: int) -> void:
@ -188,7 +189,7 @@ func _frame_back(frame_offset: int) -> void:
var frame: int = int(current_animation_position / Setting.animation_frame_rate) - frame_offset
frame = max(0, frame)
var frame_pos: float = frame * Setting.animation_frame_rate
seek(frame_pos, true, true)
seek(frame_pos- Setting.animation_frame_rate / 5, true, true)
func on_cast_sub_character() -> void:

Loading…
Cancel
Save