hit动画重构

master
chendian 1 year ago
parent 5cb429814b
commit 1ec22859fb

@ -4,7 +4,7 @@
[ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_ol2gy"] [ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_ol2gy"]
[ext_resource type="Resource" uid="uid://dpajmgrlaytah" path="res://config/character_mp/normal.tres" id="2_kkpsf"] [ext_resource type="Resource" uid="uid://dpajmgrlaytah" path="res://config/character_mp/normal.tres" id="2_kkpsf"]
[ext_resource type="Script" path="res://script/config/character_cfg.gd" id="3_0gem5"] [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="3_0gem5"]
[ext_resource type="Resource" uid="uid://dlaekoamystx3" path="res://config/character_shield/normal.tres" id="4_3daai"] [ext_resource type="Resource" uid="uid://h1curvk64vm3" path="res://config/character_shield/none.tres" id="5_2xoig"]
[ext_resource type="SpriteFrames" uid="uid://bvcrc6bbufwqv" path="res://resource/animation/character/monster03_move.aseprite" id="5_4dnud"] [ext_resource type="SpriteFrames" uid="uid://bvcrc6bbufwqv" path="res://resource/animation/character/monster03_move.aseprite" id="5_4dnud"]
[ext_resource type="Resource" uid="uid://cac6mk6g078vn" path="res://config/character_stun/normal.tres" id="6_ar00t"] [ext_resource type="Resource" uid="uid://cac6mk6g078vn" path="res://config/character_stun/normal.tres" id="6_ar00t"]
@ -16,10 +16,12 @@ sprite_frames = ExtResource("5_4dnud")
sprite_height = 45 sprite_height = 45
sprite_width = 16 sprite_width = 16
move = ExtResource("1_ol2gy") move = ExtResource("1_ol2gy")
shield = ExtResource("4_3daai") shield = ExtResource("5_2xoig")
stun = ExtResource("6_ar00t") stun = ExtResource("6_ar00t")
mp = ExtResource("2_kkpsf") mp = ExtResource("2_kkpsf")
ai = ExtResource("1_lr20m") ai = ExtResource("1_lr20m")
hp_max = 100.0 hp_max = 100.0
attack = 10.0 attack = 10.0
sub_character_auto_create = false sub_character_auto_create = false
material_on = 0
material_off = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -22,7 +22,7 @@
height = 1.0 height = 1.0
[sub_resource type="Curve" id="Curve_v7nnw"] [sub_resource type="Curve" id="Curve_v7nnw"]
_data = [Vector2(0, 0.498516), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] _data = [Vector2(0, 0.201638), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2 point_count = 2
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ehwx5"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_ehwx5"]

@ -195,6 +195,7 @@ func settle(from: int, to: int, dir: Vector2, attack: AttackCfg) -> HitResult:
if is_break_skill and attack.is_throw_check and not character_to.get_status("is_be_throw") and status.throw_target == 0: if is_break_skill and attack.is_throw_check and not character_to.get_status("is_be_throw") and status.throw_target == 0:
character_to.set_status("is_be_throw", true) character_to.set_status("is_be_throw", true)
status.throw_target = character_to.id() status.throw_target = character_to.id()
is_floating = true
#投技结束 #投技结束
if attack.is_throw_end: if attack.is_throw_end:
@ -228,7 +229,10 @@ func settle(from: int, to: int, dir: Vector2, attack: AttackCfg) -> HitResult:
if dir.x!=0: if dir.x!=0:
character_to.set_status("is_right", dir.x<0) character_to.set_status("is_right", dir.x<0)
else: else:
character_to.add_buff("stagger", 1) match break_level_sub:
1: character_to.add_buff("stagger", 0.3)
2: character_to.add_buff("stagger", 0.6)
3: character_to.add_buff("stagger", 0.9)
hit_up_speed = 0 hit_up_speed = 0
if hit_back_limit_curve: if hit_back_limit_curve:
var character_dir: Vector2 = character_from.pos2D() - character_to.pos2D() var character_dir: Vector2 = character_from.pos2D() - character_to.pos2D()

@ -36,18 +36,12 @@ func _ready():
trans("jump5", "run1", "speed_xz", ">", 1) trans("jump5", "run1", "speed_xz", ">", 1)
#地面受击 #地面受击
trigger("any", "hit1", "trigger_hit") trigger("any", "hit", "trigger_hit")
trigger("any", "mhit1", "trigger_mhit") trigger("any", "mhit", "trigger_mhit")
trigger("any", "lhit1", "trigger_lhit") trigger("any", "lhit", "trigger_lhit")
run("hit1", "hit2_loop") run("hit", "idle_loop")
run("mhit1", "mhit2_loop") run("mhit", "idle_loop")
run("lhit1", "lhit2_loop") run("lhit", "idle_loop")
trans("hit2_loop", "hit3", "is_stagger", "=", false)
trans("mhit2_loop", "mhit3", "is_stagger", "=", false)
trans("lhit2_loop", "lhit3", "is_stagger", "=", false)
run("hit3", "idle_loop")
run("mhit3", "idle_loop")
run("lhit3", "idle_loop")
#空中受击 #空中受击
trigger("any", "airhit1", "trigger_air_hit_up") trigger("any", "airhit1", "trigger_air_hit_up")
@ -203,4 +197,3 @@ func play_animation(animation_name: String) -> void:
play() play()
else: else:
play(animation_name, Setting.animation_speed_scale) play(animation_name, Setting.animation_speed_scale)

Loading…
Cancel
Save