diff --git a/addons/nklbdev.aseprite_importers/editor_import_plugins/sprite_frames.gd b/addons/nklbdev.aseprite_importers/editor_import_plugins/sprite_frames.gd index 2c07c1a..52d8747 100644 --- a/addons/nklbdev.aseprite_importers/editor_import_plugins/sprite_frames.gd +++ b/addons/nklbdev.aseprite_importers/editor_import_plugins/sprite_frames.gd @@ -14,6 +14,7 @@ func _init(parent_plugin: EditorPlugin) -> void: func _import(source_file: String, save_path: String, options: Dictionary, platform_variants: Array[String], gen_files: Array[String]) -> Error: + print("importing:",source_file) var status: Error = OK var parsed_options = Common.ParsedAnimationOptions.new(options) var export_result: ExportResult = _export_texture(source_file, parsed_options, options, gen_files) @@ -56,7 +57,6 @@ static func update_sprite_frames(export_result: ExportResult, sprite_frames: Spr for animation_tag in spritesheet_metadata.animation_tags: if not sprite_frames.has_animation(animation_tag.name): sprite_frames.add_animation(animation_tag.name) - print(animation_tag.name, animation_tag.looped) sprite_frames.set_animation_loop(animation_tag.name, animation_tag.looped) sprite_frames.set_animation_speed(animation_tag.name, 1) for frame_data in animation_tag.frames: diff --git a/config/player_skill/hero01_long_air_attack01.tres b/config/player_skill/hero01_long_air_attack01.tres index e2d3542..6b48f89 100644 --- a/config/player_skill/hero01_long_air_attack01.tres +++ b/config/player_skill/hero01_long_air_attack01.tres @@ -16,6 +16,6 @@ action = "attack_light" name = "" skill_animation = ExtResource("3_3pp8a") attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([ExtResource("1_mxlqc")]) -has_animation = true +has_animation = false sprite_frams = ExtResource("4_q0bln") animation_name = "long_air_attack01" diff --git a/config/player_skill/hero01_long_air_attack02.tres b/config/player_skill/hero01_long_air_attack02.tres index 98154cd..9d5b6cf 100644 --- a/config/player_skill/hero01_long_air_attack02.tres +++ b/config/player_skill/hero01_long_air_attack02.tres @@ -16,6 +16,6 @@ action = "attack_light" name = "" skill_animation = ExtResource("3_76yga") attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([ExtResource("1_qfkyy")]) -has_animation = true +has_animation = false sprite_frams = ExtResource("4_ahm2t") animation_name = "long_air_attack02" diff --git a/config/player_skill/hero01_long_air_attack03.tres b/config/player_skill/hero01_long_air_attack03.tres index 8ca3bd9..7b632f0 100644 --- a/config/player_skill/hero01_long_air_attack03.tres +++ b/config/player_skill/hero01_long_air_attack03.tres @@ -16,6 +16,6 @@ action = "attack_light" name = "" skill_animation = ExtResource("3_1erk8") attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([ExtResource("1_sfcbc")]) -has_animation = true +has_animation = false sprite_frams = ExtResource("4_wrd60") animation_name = "long_air_attack03" diff --git a/resource/animation/character/herA007.tmp b/resource/animation/character/herA007.tmp new file mode 100644 index 0000000..ac1a765 --- /dev/null +++ b/resource/animation/character/herA007.tmp @@ -0,0 +1,25 @@ +[remap] + +importer="Aseprite SpriteFrames Import" +type="SpriteFrames" +uid="uid://ggo0n20d5eb4" +path="res://.godot/imported/hero01_long_skill02.aseprite-8046f648b2217a8ab8a84ffac56165b9.res" + +[deps] + +source_file="res://resource/animation/character/hero01_long_skill02.aseprite" +dest_files=["res://.godot/imported/hero01_long_skill02.aseprite-8046f648b2217a8ab8a84ffac56165b9.res"] + +[params] + +spritesheet/layout=0 +spritesheet/fixed_rows_count=1 +spritesheet/fixed_columns_count=1 +spritesheet/border_type=0 +spritesheet/trim=false +spritesheet/ignore_empty=false +spritesheet/merge_duplicates=false +animation/default/name="default" +animation/default/direction=0 +animation/default/repeat_count=0 +animation/autoplay="" diff --git a/resource/animation/character/hero01_move.png.import b/resource/animation/character/hero01_move.png.import index f12948a..6325b7e 100644 --- a/resource/animation/character/hero01_move.png.import +++ b/resource/animation/character/hero01_move.png.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://ch5n7113i6kw3" +uid="uid://y8qxpvedtw6j" path="res://.godot/imported/hero01_move.png-bcacccbe39aeeae76a6dd3feeffec29f.ctex" metadata={ "vram_texture": false @@ -18,14 +18,14 @@ dest_files=["res://.godot/imported/hero01_move.png-bcacccbe39aeeae76a6dd3feeffec compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_compression=0 -compress/normal_map=2 +compress/hdr_compression=1 +compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/fix_alpha_border=false +process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false process/hdr_as_srgb=false diff --git a/resource/animation/character/monster02_move.png.import b/resource/animation/character/monster02_move.png.import index 6419c6a..49c3412 100644 --- a/resource/animation/character/monster02_move.png.import +++ b/resource/animation/character/monster02_move.png.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://cu0rdmxxgigep" +uid="uid://dajq0dmqwxyns" path="res://.godot/imported/monster02_move.png-71e8627cfe4ec225664844395c48c416.ctex" metadata={ "vram_texture": false @@ -18,14 +18,14 @@ dest_files=["res://.godot/imported/monster02_move.png-71e8627cfe4ec225664844395c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_compression=0 -compress/normal_map=2 +compress/hdr_compression=1 +compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/fix_alpha_border=false +process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false process/hdr_as_srgb=false diff --git a/scene/character/monster.tscn b/scene/character/monster.tscn index 8d4c4d5..e969d45 100644 --- a/scene/character/monster.tscn +++ b/scene/character/monster.tscn @@ -1,10 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://cdyymv2w1qr66"] +[gd_scene load_steps=2 format=3 uid="uid://cdyymv2w1qr66"] [ext_resource type="PackedScene" uid="uid://ksxwg0alt2us" path="res://scene/character/character.tscn" id="1_eshlr"] -[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="2_g7all"] [node name="Character" instance=ExtResource("1_eshlr")] [node name="View" parent="." index="2"] -sprite_frames = ExtResource("2_g7all") animation = &"long_attack01" diff --git a/script/character/battle.gd b/script/character/battle.gd index 6b09368..6466158 100644 --- a/script/character/battle.gd +++ b/script/character/battle.gd @@ -50,17 +50,20 @@ func settle(hit_info:HitInfo): var attack = hit_info.attack character_to.set_view_trigger("hit") character_to.cancel_skill() - character_to.set_hit_move(hit_info.dir,attack.hit_back_speed,attack.hit_up_speed) - character_to.add_buff("hit_back",attack.hit_back_duration) - character_to.add_buff("hit_up",attack.hit_up_duration) - #浮空 + #浮空 强制位移 + var hit_up_speed = attack.hit_up_speed if attack.is_floating: character_to.add_buff("stagger",-1) character_to.add_buff("floating",-1) else: character_to.add_buff("stagger",1) - + hit_up_speed = 0 + + character_to.set_hit_move(hit_info.dir,attack.hit_back_speed,hit_up_speed) + character_to.add_buff("hit_back",attack.hit_back_duration) + character_to.add_buff("hit_up",attack.hit_up_duration) + #抖动 character_to.add_buff("shake_x",0.2) diff --git a/script/character/buff.gd b/script/character/buff.gd index d109942..c4971a0 100644 --- a/script/character/buff.gd +++ b/script/character/buff.gd @@ -16,7 +16,7 @@ func _process(delta): var buff_info = buff_map[buff_name] if has_buff("pause") and buff_name!="pause": continue - if buff_info.duration == -1: + if buff_info.duration_max == -1: trigger_buff_effect(buff_info,"update") else: buff_info.duration += delta @@ -69,4 +69,5 @@ func on_start_floating(rate):status.is_floating = true func on_update_floating(rate): if status.is_on_floor: #反弹 - pass + status.is_floating=false + diff --git a/script/character/view.gd b/script/character/view.gd index a030fd1..fb975fb 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -34,9 +34,9 @@ func _ready(): trans("jump5","run1","speed_xz",">",1) #地面受击 - trigger_with_condition("any","hit1","trigger_hit","is_on_floor","=",true) - trigger_with_condition("any","mhit","trigger_mhit","is_on_floor","=",true) - trigger_with_condition("any","lhit","trigger_lhit","is_on_floor","=",true) + trigger_with_condition("any","hit1","trigger_hit","is_floating","=",false) + trigger_with_condition("any","mhit","trigger_mhit","is_floating","=",false) + trigger_with_condition("any","lhit","trigger_lhit","is_floating","=",false) run("hit1","hit2_loop") run("hit3","idle_loop") run("mhit3","idle_loop") @@ -48,13 +48,14 @@ func _ready(): run("lhit3","idle_loop") #空中受击 - trigger_with_condition("any","airhit1","trigger_hit","is_on_floor","=",false) + trigger_with_condition("any","airhit1","trigger_hit","is_floating","=",true) run("airhit1","airhit2_loop") trans("airhit2_loop","airhit3","speed_y","<",0) run("airhit3","airhit4_loop") trans("airhit4_loop","airhit5","is_on_floor","=",true) run("airhit5","ground1_loop") trans("ground1_loop","ground2","is_stagger","=",false) + run("ground2","idle_loop")