From 13d940a353cf9602a29249d95e5113f0e1cff562 Mon Sep 17 00:00:00 2001 From: chendian <-> Date: Sun, 15 Oct 2023 02:57:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B5=84=E6=BA=90=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor_view.tscn | 22 ++-- .../import_export/import_export_dialog.tscn | 6 +- .../import_export_enum_format.tscn | 2 +- .../import_export/property_list_item.tscn | 2 +- .../main_screen/selection_actions.tscn | 2 +- .../main_screen/table_header.tscn | 2 +- .../settings_grid.tscn | 2 +- .../typed_cells/array.tscn | 2 +- .../typed_cells/basic.tscn | 2 +- .../typed_cells/resource.tscn | 2 +- .../typed_editors/dock_array.tscn | 2 +- .../typed_editors/dock_color.tscn | 2 +- .../typed_editors/dock_dict.tscn | 2 +- .../typed_editors/dock_enum_array.tscn | 2 +- .../typed_editors/dock_number.tscn | 2 +- .../typed_editors/dock_texture.tscn | 2 +- .../attack/{normal.tres => normal_hit.tres} | 0 config/attack/normal_hit_up.tres | 14 +++ config/character/hero01.tres | 2 +- config/character/monster01.tres | 2 +- config/character/monster02.tres | 2 +- config/player_skill/hero01_long_attack01.tres | 4 +- config/player_skill/hero01_long_attack02.tres | 4 +- config/player_skill/hero01_long_attack03.tres | 4 +- config/player_skill/hero01_long_attack04.tres | 4 +- config/player_skill/hero01_long_flash.tres | 2 +- config/player_skill/hero01_long_skill01.tres | 4 +- config/player_skill/hero01_long_skill02.tres | 21 ++++ config/skill/hero01.tres | 6 +- config/weapon/fist.tres | 2 +- config/weapon/long.tres | 2 +- config/weapon/short.tres | 2 +- project.godot | 5 + .../character/hero01_fist_skill01.aseprite | Bin 6105 -> 6031 bytes .../skill_animation/hero01_long_attack02.tres | 2 +- .../skill_animation/hero01_long_attack03.tres | 2 +- .../skill_animation/hero01_long_attack04.tres | 2 +- .../skill_animation/hero01_long_flash.tres | 2 +- .../skill_animation/hero01_long_skill01.tres | 2 +- .../skill_animation/hero01_long_skill02.tres | 105 ++++++++++++++++++ .../animation_library.tres | 6 +- scene/character/character.tscn | 13 ++- scene/character/monster.tscn | 4 +- scene/character/player.tscn | 7 +- scene/launcher.tscn | 2 +- script/character/character.gd | 1 + script/character/move.gd | 12 +- script/character/skill.gd | 11 +- script/character/status.gd | 1 + script/character/view.gd | 39 ++++--- script/editor_tool/editor_tool.gd | 25 +++++ script/manager/character_manager.gd | 2 +- 52 files changed, 278 insertions(+), 96 deletions(-) rename config/attack/{normal.tres => normal_hit.tres} (100%) create mode 100644 config/attack/normal_hit_up.tres create mode 100644 config/player_skill/hero01_long_skill02.tres create mode 100644 resource/skill_animation/hero01_long_skill02.tres diff --git a/addons/resources_spreadsheet_view/editor_view.tscn b/addons/resources_spreadsheet_view/editor_view.tscn index 8bb83bc..be6459d 100644 --- a/addons/resources_spreadsheet_view/editor_view.tscn +++ b/addons/resources_spreadsheet_view/editor_view.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://tmleonv20aqk"] +[gd_scene load_steps=30 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_view.gd" id="1_wfx75"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_color_setter.gd" id="2_t2s7k"] @@ -7,16 +7,16 @@ [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/expression_textfield.gd" id="5_faq75"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/table_pages.gd" id="5_ka2yn"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/column_header_manager.gd" id="6_emnmd"] -[ext_resource type="PackedScene" uid="uid://d1s6oihqedvo5" path="res://addons/resources_spreadsheet_view/main_screen/table_header.tscn" id="7_3dx0v"] -[ext_resource type="PackedScene" uid="uid://ddqak780cwwfj" path="res://addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn" id="8_234wn"] -[ext_resource type="PackedScene" uid="uid://c3a2cip8ffccv" path="res://addons/resources_spreadsheet_view/typed_editors/dock_array.tscn" id="9_nts08"] -[ext_resource type="PackedScene" uid="uid://b3a3bo6cfyh5t" path="res://addons/resources_spreadsheet_view/typed_editors/dock_color.tscn" id="10_nsma2"] -[ext_resource type="PackedScene" uid="uid://gtbf7b0wptv" path="res://addons/resources_spreadsheet_view/typed_editors/dock_number.tscn" id="11_q1ao4"] -[ext_resource type="PackedScene" uid="uid://rww3gpl052bn" path="res://addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn" id="12_4kr6q"] -[ext_resource type="PackedScene" uid="uid://dhunxgcae6h1" path="res://addons/resources_spreadsheet_view/settings_grid.tscn" id="13_as1sh"] -[ext_resource type="PackedScene" uid="uid://p6x03dbvhnqw" path="res://addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn" id="13_il556"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/main_screen/table_header.tscn" id="7_3dx0v"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn" id="8_234wn"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_array.tscn" id="9_nts08"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_color.tscn" id="10_nsma2"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_number.tscn" id="11_q1ao4"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn" id="12_4kr6q"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/settings_grid.tscn" id="13_as1sh"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn" id="13_il556"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/input_handler.gd" id="14_2t57a"] -[ext_resource type="PackedScene" uid="uid://b413igx28kkvb" path="res://addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn" id="14_3p12b"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn" id="14_3p12b"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/selection_manager.gd" id="15_mx6qn"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_enum_array.gd" id="16_p7n52"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_array.gd" id="17_sofdw"] @@ -26,7 +26,7 @@ [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_enum.gd" id="20_swsbn"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_resource.gd" id="21_58wf8"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_string.gd" id="22_bni8r"] -[ext_resource type="PackedScene" uid="uid://b51hnttsie7k5" path="res://addons/resources_spreadsheet_view/main_screen/selection_actions.tscn" id="23_m53sx"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/main_screen/selection_actions.tscn" id="23_m53sx"] [sub_resource type="Gradient" id="Gradient_8kp6w"] offsets = PackedFloat32Array(0, 0.995413, 1) diff --git a/addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn b/addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn index 16d1a10..66ebb0f 100644 --- a/addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn +++ b/addons/resources_spreadsheet_view/import_export/import_export_dialog.tscn @@ -1,10 +1,10 @@ -[gd_scene load_steps=7 format=3 uid="uid://b413igx28kkvb"] +[gd_scene load_steps=7 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/import_export/import_export_dialog.gd" id="1"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/import_export/formats_export/export_csv.gd" id="2_33c6s"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/import_export/formats_import/import_csv.gd" id="2_fxayt"] -[ext_resource type="PackedScene" uid="uid://b8llymigbprh6" path="res://addons/resources_spreadsheet_view/import_export/property_list_item.tscn" id="2_xfhmf"] -[ext_resource type="PackedScene" uid="uid://ckhf3bqy2rqjr" path="res://addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn" id="4"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/import_export/property_list_item.tscn" id="2_xfhmf"] +[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn" id="4"] [sub_resource type="ButtonGroup" id="ButtonGroup_080hd"] diff --git a/addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn b/addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn index 39ec94a..cc2facc 100644 --- a/addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn +++ b/addons/resources_spreadsheet_view/import_export/import_export_enum_format.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://ckhf3bqy2rqjr"] +[gd_scene load_steps=2 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/import_export/import_export_enum_format.gd" id="1"] diff --git a/addons/resources_spreadsheet_view/import_export/property_list_item.tscn b/addons/resources_spreadsheet_view/import_export/property_list_item.tscn index 75172d5..2f9520f 100644 --- a/addons/resources_spreadsheet_view/import_export/property_list_item.tscn +++ b/addons/resources_spreadsheet_view/import_export/property_list_item.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://b8llymigbprh6"] +[gd_scene load_steps=2 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/import_export/property_list_item.gd" id="1"] diff --git a/addons/resources_spreadsheet_view/main_screen/selection_actions.tscn b/addons/resources_spreadsheet_view/main_screen/selection_actions.tscn index e17318e..262cab4 100644 --- a/addons/resources_spreadsheet_view/main_screen/selection_actions.tscn +++ b/addons/resources_spreadsheet_view/main_screen/selection_actions.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://b51hnttsie7k5"] +[gd_scene load_steps=7 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="1"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/selection_actions.gd" id="1_qv6ov"] diff --git a/addons/resources_spreadsheet_view/main_screen/table_header.tscn b/addons/resources_spreadsheet_view/main_screen/table_header.tscn index bd7fbb7..dcb0548 100644 --- a/addons/resources_spreadsheet_view/main_screen/table_header.tscn +++ b/addons/resources_spreadsheet_view/main_screen/table_header.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=3 format=3 uid="uid://d1s6oihqedvo5"] +[gd_scene load_steps=3 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/main_screen/table_header.gd" id="1_5fd1m"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2_0ymob"] diff --git a/addons/resources_spreadsheet_view/settings_grid.tscn b/addons/resources_spreadsheet_view/settings_grid.tscn index ed692be..2bc83be 100644 --- a/addons/resources_spreadsheet_view/settings_grid.tscn +++ b/addons/resources_spreadsheet_view/settings_grid.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://dhunxgcae6h1"] +[gd_scene load_steps=2 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/settings_grid.gd" id="1_s8s2f"] diff --git a/addons/resources_spreadsheet_view/typed_cells/array.tscn b/addons/resources_spreadsheet_view/typed_cells/array.tscn index 61062ac..1486865 100644 --- a/addons/resources_spreadsheet_view/typed_cells/array.tscn +++ b/addons/resources_spreadsheet_view/typed_cells/array.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://ydrs54md3knl"] +[gd_scene format=3] [node name="Label" type="MarginContainer"] offset_right = 16.0 diff --git a/addons/resources_spreadsheet_view/typed_cells/basic.tscn b/addons/resources_spreadsheet_view/typed_cells/basic.tscn index 541f1ba..98aff12 100644 --- a/addons/resources_spreadsheet_view/typed_cells/basic.tscn +++ b/addons/resources_spreadsheet_view/typed_cells/basic.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://cghfjg6qt3rb1"] +[gd_scene format=3] [node name="Label" type="Label"] offset_right = 20.0 diff --git a/addons/resources_spreadsheet_view/typed_cells/resource.tscn b/addons/resources_spreadsheet_view/typed_cells/resource.tscn index 1372d02..2034bec 100644 --- a/addons/resources_spreadsheet_view/typed_cells/resource.tscn +++ b/addons/resources_spreadsheet_view/typed_cells/resource.tscn @@ -1,4 +1,4 @@ -[gd_scene format=3 uid="uid://clcndgxaty503"] +[gd_scene format=3] [node name="Label" type="MarginContainer"] size_flags_vertical = 9 diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_array.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_array.tscn index 6d3ff29..bc4a4e6 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_array.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_array.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://c3a2cip8ffccv"] +[gd_scene load_steps=5 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_array.gd" id="1"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2"] diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_color.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_color.tscn index d7774e1..5b6c13d 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_color.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_color.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://b3a3bo6cfyh5t"] +[gd_scene load_steps=2 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_color.gd" id="1"] diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn index 66f54b8..d5a53f5 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_dict.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://p6x03dbvhnqw"] +[gd_scene load_steps=5 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_dict.gd" id="1_2yivi"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2_yck0k"] diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn index c1540d5..cdc5a0a 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://ddqak780cwwfj"] +[gd_scene load_steps=5 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_enum_array.gd" id="1_n3flg"] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2_mda1e"] diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_number.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_number.tscn index a191cda..27806af 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_number.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_number.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=2 format=3 uid="uid://gtbf7b0wptv"] +[gd_scene load_steps=2 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_number.gd" id="1"] diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn b/addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn index 6630074..badb934 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn +++ b/addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=3 format=3 uid="uid://rww3gpl052bn"] +[gd_scene load_steps=3 format=3] [ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_texture.gd" id="1"] [ext_resource type="Texture2D" path="res://icon.svg" id="2_xbp0j"] diff --git a/config/attack/normal.tres b/config/attack/normal_hit.tres similarity index 100% rename from config/attack/normal.tres rename to config/attack/normal_hit.tres diff --git a/config/attack/normal_hit_up.tres b/config/attack/normal_hit_up.tres new file mode 100644 index 0000000..3255e4d --- /dev/null +++ b/config/attack/normal_hit_up.tres @@ -0,0 +1,14 @@ +[gd_resource type="Resource" script_class="AttackCfg" load_steps=2 format=3 uid="uid://ckbf40c75bfqf"] + +[ext_resource type="Script" path="res://script/config/attack_cfg.gd" id="1_iuifx"] + +[resource] +script = ExtResource("1_iuifx") +damage_rate = 1.0 +break_level = 0 +hit_back_speed = 2.0 +hit_back_duration = 0.05 +hit_up_speed = 4.0 +hit_up_duration = 0.1 +pause_time = 0.0 +is_floating = true diff --git a/config/character/hero01.tres b/config/character/hero01.tres index 879ecdf..9b0c1b2 100644 --- a/config/character/hero01.tres +++ b/config/character/hero01.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="1_2054l"] [ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_ebj0w"] -[ext_resource type="SpriteFrames" uid="uid://cijqp2fy7taqp" path="res://resource/animation/character/hero01_move.aseprite" id="2_cssb0"] +[ext_resource type="SpriteFrames" uid="uid://cwe8setoi6bd" path="res://resource/animation/character/hero01_move.aseprite" id="2_cssb0"] [resource] script = ExtResource("1_2054l") diff --git a/config/character/monster01.tres b/config/character/monster01.tres index 3db677d..5b07c0b 100644 --- a/config/character/monster01.tres +++ b/config/character/monster01.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="1_4orbu"] [ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_b0lkj"] -[ext_resource type="SpriteFrames" uid="uid://dy0krmwjhale" path="res://resource/animation/character/monster01_move.aseprite" id="2_su3hg"] +[ext_resource type="SpriteFrames" uid="uid://dkljs5h8gj5l" path="res://resource/animation/character/monster01_move.aseprite" id="2_su3hg"] [resource] script = ExtResource("1_4orbu") diff --git a/config/character/monster02.tres b/config/character/monster02.tres index 6d121f9..640fff3 100644 --- a/config/character/monster02.tres +++ b/config/character/monster02.tres @@ -2,7 +2,7 @@ [ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_hjl2t"] [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="1_wkjce"] -[ext_resource type="SpriteFrames" uid="uid://criqnimi5dara" path="res://resource/animation/character/monster02_move.aseprite" id="2_h60bf"] +[ext_resource type="SpriteFrames" uid="uid://crdd52skym3ir" path="res://resource/animation/character/monster02_move.aseprite" id="2_h60bf"] [resource] script = ExtResource("1_wkjce") diff --git a/config/player_skill/hero01_long_attack01.tres b/config/player_skill/hero01_long_attack01.tres index 7a5df01..ee62d2e 100644 --- a/config/player_skill/hero01_long_attack01.tres +++ b/config/player_skill/hero01_long_attack01.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://b6x3jdiqtum6"] -[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal.tres" id="1_6ven2"] +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_6ven2"] [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_gik08"] [ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="2_6nbpq"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_og1bb"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_og1bb"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_id85o"] [resource] diff --git a/config/player_skill/hero01_long_attack02.tres b/config/player_skill/hero01_long_attack02.tres index 3615579..c59beea 100644 --- a/config/player_skill/hero01_long_attack02.tres +++ b/config/player_skill/hero01_long_attack02.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://cs32884hwqxd7"] -[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal.tres" id="1_8fm1u"] +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_8fm1u"] [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_e0fqi"] [ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_jrgan"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_novna"] [resource] diff --git a/config/player_skill/hero01_long_attack03.tres b/config/player_skill/hero01_long_attack03.tres index 9652955..099191a 100644 --- a/config/player_skill/hero01_long_attack03.tres +++ b/config/player_skill/hero01_long_attack03.tres @@ -1,10 +1,10 @@ [gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://huxlxrmyulo"] -[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal.tres" id="1_4o7bo"] +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_4o7bo"] [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uaib7"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_8uqiw"] [ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="2_ugt3f"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"] [resource] script = ExtResource("1_uaib7") diff --git a/config/player_skill/hero01_long_attack04.tres b/config/player_skill/hero01_long_attack04.tres index 4e8e4ef..e5a6cb4 100644 --- a/config/player_skill/hero01_long_attack04.tres +++ b/config/player_skill/hero01_long_attack04.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://chuv8k5d44ln4"] -[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal.tres" id="1_kpxla"] +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_kpxla"] [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_xsxbs"] [ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="2_sam6s"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_plyre"] [resource] diff --git a/config/player_skill/hero01_long_flash.tres b/config/player_skill/hero01_long_flash.tres index 6d37a86..64f87b4 100644 --- a/config/player_skill/hero01_long_flash.tres +++ b/config/player_skill/hero01_long_flash.tres @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_yamsl"] [ext_resource type="Animation" uid="uid://cwm116apu63n1" path="res://resource/skill_animation/hero01_long_flash.tres" id="2_bdxlh"] -[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="2_uof6p"] +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="2_uof6p"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_xft4c"] [resource] diff --git a/config/player_skill/hero01_long_skill01.tres b/config/player_skill/hero01_long_skill01.tres index a83fe43..4ef0e72 100644 --- a/config/player_skill/hero01_long_skill01.tres +++ b/config/player_skill/hero01_long_skill01.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://bi2ipbximefsr"] -[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal.tres" id="1_p5wrw"] +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_p5wrw"] [ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_ud5ph"] [ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="2_ewts2"] -[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"] +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_3bf64"] [resource] diff --git a/config/player_skill/hero01_long_skill02.tres b/config/player_skill/hero01_long_skill02.tres new file mode 100644 index 0000000..33d94ee --- /dev/null +++ b/config/player_skill/hero01_long_skill02.tres @@ -0,0 +1,21 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=6 format=3 uid="uid://4whbnu8f7qyo"] + +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_tcc88"] +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_1xtt1"] +[ext_resource type="Animation" uid="uid://iprcbf277rf4" path="res://resource/skill_animation/hero01_long_skill02.tres" id="3_b7s0y"] +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="4_rbnly"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_u5xo6"] + +[resource] +script = ExtResource("2_1xtt1") +weapon = ExtResource("5_u5xo6") +stance_from = 2 +stance_to = 10 +break_level = 3 +action = "attack_heavy" +name = "" +skill_animation = ExtResource("3_b7s0y") +attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([ExtResource("1_tcc88")]) +has_animation = false +sprite_frams = ExtResource("4_rbnly") +animation_name = "long_skill02" diff --git a/config/skill/hero01.tres b/config/skill/hero01.tres index 4112d38..22f3ffe 100644 --- a/config/skill/hero01.tres +++ b/config/skill/hero01.tres @@ -1,12 +1,12 @@ [gd_resource type="Resource" script_class="SkillCfg" load_steps=3 format=3 uid="uid://p7rrgcllpisi"] [ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_jpm54"] -[ext_resource type="SpriteFrames" uid="uid://ii1wpqmkpqa3" path="res://resource/animation/character/basic_move.aseprite" id="2_2pfl0"] +[ext_resource type="SpriteFrames" uid="uid://2cb8lknel0ih" path="res://resource/animation/character/basic_move.aseprite" id="2_2pfl0"] [resource] script = ExtResource("1_jpm54") name = "" +attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([]) has_animation = false sprite_frams = ExtResource("2_2pfl0") -animation1 = "ground1_loop" -animation2 = "" +animation_name = "" diff --git a/config/weapon/fist.tres b/config/weapon/fist.tres index dde2dec..d36ecd3 100644 --- a/config/weapon/fist.tres +++ b/config/weapon/fist.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="Weapon" load_steps=2 format=3 uid="uid://c6alg8pmqfdxm"] +[gd_resource type="Resource" script_class="WeaponCfg" load_steps=2 format=3 uid="uid://c6alg8pmqfdxm"] [ext_resource type="Script" path="res://script/config/weapon_cfg.gd" id="1_03rlg"] diff --git a/config/weapon/long.tres b/config/weapon/long.tres index fd83130..fc36f1b 100644 --- a/config/weapon/long.tres +++ b/config/weapon/long.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="Weapon" load_steps=2 format=3 uid="uid://cy3wwalxeyro0"] +[gd_resource type="Resource" script_class="WeaponCfg" load_steps=2 format=3 uid="uid://cy3wwalxeyro0"] [ext_resource type="Script" path="res://script/config/weapon_cfg.gd" id="1_ihw7q"] diff --git a/config/weapon/short.tres b/config/weapon/short.tres index 500495d..14890f3 100644 --- a/config/weapon/short.tres +++ b/config/weapon/short.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="Weapon" load_steps=2 format=3 uid="uid://pnhii1a83axg"] +[gd_resource type="Resource" script_class="WeaponCfg" load_steps=2 format=3 uid="uid://pnhii1a83axg"] [ext_resource type="Script" path="res://script/config/weapon_cfg.gd" id="1_gwwxv"] diff --git a/project.godot b/project.godot index 6781105..5e8214d 100644 --- a/project.godot +++ b/project.godot @@ -116,6 +116,11 @@ flash={ ] } +[memory] + +limits/multithreaded_server/rid_pool_prealloc=100 +limits/message_queue/max_size_mb=2048 + [rendering] lights_and_shadows/directional_shadow/soft_shadow_filter_quality=4 diff --git a/resource/animation/character/hero01_fist_skill01.aseprite b/resource/animation/character/hero01_fist_skill01.aseprite index 8f2405856390bf2f9c6e135b418bcc54be02deb5..c0c18d18aba0de8dee1250e25b253166b10bd7de 100644 GIT binary patch delta 82 zcmcbq->=WuKasJXk#S>V4U2F90|SGE0uzvg07eGZ$pWl0ifjx#Fd+!d$B>p;ToPZL VotcwkU}#`C*^#$uvmo0EK>$Aw4!8gS delta 131 zcmeCzzp2l7b0T9sqxZ(f8W!PM3=9ks3M@bp0vH*XCkwF3sIxGz!h|5SAVXSaaY=k} rc4khFfnj`7VsbVc1J`7IRyj3p1|C$k!YFE?sweLguG)N@^@Jb*3%weM diff --git a/resource/skill_animation/hero01_long_attack02.tres b/resource/skill_animation/hero01_long_attack02.tres index c2f166e..4939220 100644 --- a/resource/skill_animation/hero01_long_attack02.tres +++ b/resource/skill_animation/hero01_long_attack02.tres @@ -1,6 +1,6 @@ [gd_resource type="Animation" load_steps=2 format=3 uid="uid://bf6jaraltouun"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_c706k"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_c706k"] [resource] resource_name = "hero01_long_attack02" diff --git a/resource/skill_animation/hero01_long_attack03.tres b/resource/skill_animation/hero01_long_attack03.tres index 0f8784a..a5d74ad 100644 --- a/resource/skill_animation/hero01_long_attack03.tres +++ b/resource/skill_animation/hero01_long_attack03.tres @@ -1,6 +1,6 @@ [gd_resource type="Animation" load_steps=2 format=3 uid="uid://c8yueqe7rjn60"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_o7s2b"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_o7s2b"] [resource] resource_name = "hero01_long_attack03" diff --git a/resource/skill_animation/hero01_long_attack04.tres b/resource/skill_animation/hero01_long_attack04.tres index a24dc3a..ecd71a3 100644 --- a/resource/skill_animation/hero01_long_attack04.tres +++ b/resource/skill_animation/hero01_long_attack04.tres @@ -1,6 +1,6 @@ [gd_resource type="Animation" load_steps=2 format=3 uid="uid://dk1o3gqhjmuvh"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_ixwev"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_ixwev"] [resource] resource_name = "hero01_long_attack04" diff --git a/resource/skill_animation/hero01_long_flash.tres b/resource/skill_animation/hero01_long_flash.tres index 39cccbe..0edd5ce 100644 --- a/resource/skill_animation/hero01_long_flash.tres +++ b/resource/skill_animation/hero01_long_flash.tres @@ -1,6 +1,6 @@ [gd_resource type="Animation" load_steps=2 format=3 uid="uid://cwm116apu63n1"] -[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="2_3eu5o"] +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="2_3eu5o"] [resource] resource_name = "hero01_long_flash" diff --git a/resource/skill_animation/hero01_long_skill01.tres b/resource/skill_animation/hero01_long_skill01.tres index 756ef38..9c8a5b8 100644 --- a/resource/skill_animation/hero01_long_skill01.tres +++ b/resource/skill_animation/hero01_long_skill01.tres @@ -1,6 +1,6 @@ [gd_resource type="Animation" load_steps=2 format=3 uid="uid://bjnkrte7660pt"] -[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="1_54a73"] +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="1_54a73"] [resource] resource_name = "hero01_long_skill01" diff --git a/resource/skill_animation/hero01_long_skill02.tres b/resource/skill_animation/hero01_long_skill02.tres new file mode 100644 index 0000000..ee79000 --- /dev/null +++ b/resource/skill_animation/hero01_long_skill02.tres @@ -0,0 +1,105 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://iprcbf277rf4"] + +[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="1_5wtdf"] + +[resource] +resource_name = "hero01_long_skill02" +length = 0.8 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("View:sprite_frames") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [ExtResource("1_5wtdf")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("View:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": ["long_skill02"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("View:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [0, 1, 2, 3, 4, 5, 6, 7] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Status:break_level") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [0, 3] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Status:speed_up_rate") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0.1, 0.2), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [-0.5, -1.0] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Status:skill_move_speed") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0.1, 0.2), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [4.0, 0.0] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Status:skill_float_speed") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.4, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [3.0, 0.0] +} +tracks/7/type = "method" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Battle") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0.4), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"attack" +}] +} diff --git a/resource/skill_animation_library/animation_library.tres b/resource/skill_animation_library/animation_library.tres index bab1bf4..2079d16 100644 --- a/resource/skill_animation_library/animation_library.tres +++ b/resource/skill_animation_library/animation_library.tres @@ -1,4 +1,4 @@ -[gd_resource type="AnimationLibrary" load_steps=7 format=3 uid="uid://croik07a1qko5"] +[gd_resource type="AnimationLibrary" load_steps=8 format=3 uid="uid://croik07a1qko5"] [ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="1_nwjtl"] [ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_klfcs"] @@ -6,6 +6,7 @@ [ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="4_36e6x"] [ext_resource type="Animation" uid="uid://cwm116apu63n1" path="res://resource/skill_animation/hero01_long_flash.tres" id="5_fumom"] [ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"] +[ext_resource type="Animation" uid="uid://iprcbf277rf4" path="res://resource/skill_animation/hero01_long_skill02.tres" id="7_ui68j"] [resource] _data = { @@ -14,5 +15,6 @@ _data = { "hero01_long_attack03": ExtResource("3_g8q4d"), "hero01_long_attack04": ExtResource("4_36e6x"), "hero01_long_flash": ExtResource("5_fumom"), -"hero01_long_skill01": ExtResource("5_kt0qw") +"hero01_long_skill01": ExtResource("5_kt0qw"), +"hero01_long_skill02": ExtResource("7_ui68j") } diff --git a/scene/character/character.tscn b/scene/character/character.tscn index 653b9ee..855c0e0 100644 --- a/scene/character/character.tscn +++ b/scene/character/character.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=11 format=3 uid="uid://vnkcr04hevna"] +[gd_scene load_steps=11 format=3 uid="uid://ksxwg0alt2us"] [ext_resource type="Script" path="res://script/character/character.gd" id="1_tonbs"] [ext_resource type="Script" path="res://script/character/status.gd" id="2_txdip"] -[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_vw4qy"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_p576o"] [ext_resource type="Script" path="res://script/character/move.gd" id="4_66r53"] [ext_resource type="Script" path="res://script/character/view.gd" id="4_vijjv"] [ext_resource type="Script" path="res://script/character/skill.gd" id="6_h4xqy"] @@ -23,15 +23,18 @@ shape = SubResource("BoxShape3D_ty8lx") [node name="Status" type="Node3D" parent="."] unique_name_in_owner = true script = ExtResource("2_txdip") -speed_up_rate = -0.5 +speed_up_rate = -1.0 +skill_float_speed = 3.0 +break_level = 4 [node name="View" type="AnimatedSprite3D" parent="."] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1.414, 0, 0, 0, 1, 0, 0, 0) alpha_cut = 2 texture_filter = 0 -sprite_frames = ExtResource("3_vw4qy") -animation = &"long_skill01" +sprite_frames = ExtResource("3_p576o") +animation = &"long_attack01" +frame = 8 script = ExtResource("4_vijjv") [node name="Move" type="Node3D" parent="."] diff --git a/scene/character/monster.tscn b/scene/character/monster.tscn index bc23766..f530f1b 100644 --- a/scene/character/monster.tscn +++ b/scene/character/monster.tscn @@ -1,5 +1,5 @@ -[gd_scene load_steps=2 format=3 uid="uid://c0sqb3w2tjjym"] +[gd_scene load_steps=2 format=3 uid="uid://cdyymv2w1qr66"] -[ext_resource type="PackedScene" uid="uid://vnkcr04hevna" path="res://scene/character/character.tscn" id="1_eshlr"] +[ext_resource type="PackedScene" uid="uid://ksxwg0alt2us" path="res://scene/character/character.tscn" id="1_eshlr"] [node name="Character" instance=ExtResource("1_eshlr")] diff --git a/scene/character/player.tscn b/scene/character/player.tscn index 76bd91a..42b6c03 100644 --- a/scene/character/player.tscn +++ b/scene/character/player.tscn @@ -1,14 +1,11 @@ -[gd_scene load_steps=4 format=3 uid="uid://bw48w3ehhjvg7"] +[gd_scene load_steps=4 format=3 uid="uid://ba7pkdaq5y8nl"] -[ext_resource type="PackedScene" uid="uid://vnkcr04hevna" path="res://scene/character/character.tscn" id="1_pot50"] +[ext_resource type="PackedScene" uid="uid://ksxwg0alt2us" path="res://scene/character/character.tscn" id="1_pot50"] [ext_resource type="Script" path="res://script/character/player/combo.gd" id="2_i44w8"] [ext_resource type="Script" path="res://script/character/player/player_input.gd" id="3_n07go"] [node name="Character" instance=ExtResource("1_pot50")] -[node name="View" parent="." index="2"] -animation = &"long_skill02" - [node name="Combo" type="Node3D" parent="." index="7"] unique_name_in_owner = true script = ExtResource("2_i44w8") diff --git a/scene/launcher.tscn b/scene/launcher.tscn index 457c145..35df9ea 100644 --- a/scene/launcher.tscn +++ b/scene/launcher.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://sl6cgchsyqlo"] +[gd_scene load_steps=8 format=3 uid="uid://bkhnhc6bk3w7l"] [ext_resource type="Script" path="res://script/manager/game_manager.gd" id="1_q2t80"] [ext_resource type="ArrayMesh" uid="uid://cap7t5iwpjpi2" path="res://resource/level/levelground0000.vox" id="1_u51ir"] diff --git a/script/character/character.gd b/script/character/character.gd index 8cc1428..5735733 100644 --- a/script/character/character.gd +++ b/script/character/character.gd @@ -25,6 +25,7 @@ func build_view(cfg:CharacterCfg): collision.scale = Vector3(width,half_height*2,width) view.position = Vector3(0,half_height,0) view.init(cfg.sprite_frames) + skill.init() func build_battle(cfg:CharacterCfg): status.hp = cfg.hp_max diff --git a/script/character/move.gd b/script/character/move.gd index a8213fc..329b047 100644 --- a/script/character/move.gd +++ b/script/character/move.gd @@ -8,7 +8,7 @@ var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") func _physics_process(delta): update_on_floor(delta) - update_gravity(delta) + update_speed_y(delta) update_move() character.move_and_slide() @@ -22,9 +22,13 @@ func update_on_floor(delta): status.is_jumped_check_time = 0 status.is_jumped = false -func update_gravity(delta): - if not status.is_on_floor: - character.velocity.y -= gravity * delta * status.cfg.move.gravity_scale +func update_speed_y(delta): + var has_y_speed = status.skill_float_speed != 0 or status.hit_up_speed != 0 + if has_y_speed: + character.velocity.y = status.skill_float_speed + status.hit_up_speed + else: + if not status.is_on_floor: + character.velocity.y -= gravity * delta * status.cfg.move.gravity_scale status.speed_y = character.velocity.y func update_move(): diff --git a/script/character/skill.gd b/script/character/skill.gd index 1ea8ee6..fa7b78e 100644 --- a/script/character/skill.gd +++ b/script/character/skill.gd @@ -4,11 +4,8 @@ class_name Skill @onready var view = (%View as View) @onready var status = (%Status as Status) -func _ready(): - pass - -func _process(delta): - pass +func init(): + cancel_skill() func cast_skill(cfg:SkillCfg,cast_dir:Vector2): if cast_dir.length() == 0: @@ -17,6 +14,8 @@ func cast_skill(cfg:SkillCfg,cast_dir:Vector2): var animation_name = "animation_library/%s" % Util.get_resource_name(cfg) if has_animation(animation_name): status.speed_up_rate = -1 + status.skill_move_speed = 0 + status.skill_float_speed = 0 status.is_free_control = false status.is_free_turn = false status.is_skill_running = true @@ -31,6 +30,8 @@ func cast_skill(cfg:SkillCfg,cast_dir:Vector2): func cancel_skill(): stop() status.speed_up_rate = 0 + status.skill_move_speed = 0 + status.skill_float_speed = 0 status.is_free_control = true status.is_free_turn = true status.is_skill_running = false diff --git a/script/character/status.gd b/script/character/status.gd index f89ee28..7b7ea83 100644 --- a/script/character/status.gd +++ b/script/character/status.gd @@ -40,6 +40,7 @@ class_name Status @export var is_skill_running : bool #技能是否正在释放 @export var skill_dir : Vector2 #技能释放方向 @export var skill_move_speed : float #技能位移速度 +@export var skill_float_speed : float #技能y位移速度 @export var skill_attack_index : int #技能攻击段数 @export_category("玩家技能状态") diff --git a/script/character/view.gd b/script/character/view.gd index 3feda6b..b9bbb72 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -7,15 +7,17 @@ class Trans: var condition:StringName var compareType:String var conditionValue + var from:StringName var to:StringName class Trigger: var condition:StringName + var from:StringName var to:StringName var run_map = {} -var trans_map = {} -var trigger_map = {} +var trans_list = [] +var trigger_list = [] var move_sprite_frames:SpriteFrames func _ready(): @@ -65,32 +67,33 @@ func trans(from:StringName,to:StringName,condition,compareType,conditionValue): newTrans.condition = condition newTrans.compareType = compareType newTrans.conditionValue = conditionValue + newTrans.from = from newTrans.to = to - trans_map[from] = newTrans + trans_list.append(newTrans) func trigger(from:StringName,to:StringName,condition): var newTrigger = Trans.new() newTrigger.condition = condition + newTrigger.from = from newTrigger.to = to - trigger_map[from] = newTrigger + trigger_list.append(newTrigger) func update_trigger(): - for animation in trigger_map: - var trigger = trigger_map[animation] - var triggerValue = status.get(trigger.condition) - if triggerValue: - status.set(trigger.condition,false) - play(trigger.to) + for trigger in trigger_list: + if trigger.from == "any" or trigger.from == animation: + if status.get(trigger.condition): + status.set(trigger.condition,false) + play(trigger.to) func update_trans(): - if animation in trans_map: - var trans = trans_map[animation] - var conditionValue = status.get(trans.condition) - match trans.compareType: - ">":if conditionValue <= trans.conditionValue:return - "<":if conditionValue >= trans.conditionValue:return - "=":if conditionValue != trans.conditionValue:return - play(trans.to) + for trans in trans_list: + if trans.from == "any" or trans.from == animation: + var conditionValue = status.get(trans.condition) + match trans.compareType: + ">":if conditionValue <= trans.conditionValue:return + "<":if conditionValue >= trans.conditionValue:return + "=":if conditionValue != trans.conditionValue:return + play(trans.to) func update_flip(): scale.x = 1 if status.is_right else -1 diff --git a/script/editor_tool/editor_tool.gd b/script/editor_tool/editor_tool.gd index d2a365b..93fee03 100644 --- a/script/editor_tool/editor_tool.gd +++ b/script/editor_tool/editor_tool.gd @@ -7,3 +7,28 @@ extends Node3D set(value): Util.refresh_animation_lib() +@export var refresh_uid : bool : + get: + return false + set(value): + process_dir("res://") + +func process_dir(dir_name: String) -> void: + var dir := DirAccess.open(dir_name) + if dir: + dir.list_dir_begin() + var file_name = dir.get_next() + if dir_name.ends_with("/"): + dir_name = dir_name.trim_suffix("/") + while file_name != "": + if dir.current_is_dir(): + print("----- New directory: " + dir_name + "/" + file_name + " -----") + process_dir(dir_name + "/" + file_name) + elif file_name.get_extension() in [ "tres", "res" ]: + print("Processing file: " + dir_name + "/" + file_name) + var res := ResourceLoader.load(dir_name + "/" + file_name) + ResourceSaver.save(res) + + file_name = dir.get_next() + else: + print("An error occurred when trying to access the path: ", dir_name) diff --git a/script/manager/character_manager.gd b/script/manager/character_manager.gd index 741af98..cb7be8a 100644 --- a/script/manager/character_manager.gd +++ b/script/manager/character_manager.gd @@ -16,7 +16,7 @@ func create_character(cfg:CharacterCfg,team:Enum.ETeam,pos:Vector3): characterNode = scene_monster.instantiate() add_child(characterNode) characterNode.name = cfg.name - var character:Character = characterNode as Character + var character = characterNode as Character character_idx += 1 character_map[character_idx]=character character.init(self,character_idx,cfg,team)