From 51d2725b7e7b948c2073a9833ca07c5c827613c0 Mon Sep 17 00:00:00 2001 From: chendian <-> Date: Thu, 29 Aug 2024 08:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E5=BC=B9=E3=80=81ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/beehave/nodes/beehave_tree.gd | 248 +++++++------- config/attack_box/circle_normal_thin.tres | 11 + config/character/bullet01.tres | 16 +- config/character_move/fast.tres | 2 +- config/character_move/fast_fly.tres | 9 + config/core/free01.tres | 13 - config/core/free02.tres | 11 - config/core/hero01_combo01.tres | 8 + config/core/hero01_remote01.tres | 8 + config/core/hero01_slash01.tres | 8 + config/skill_core/hero01_combo01_1.tres | 19 ++ config/skill_core/hero01_combo01_2.tres | 19 ++ config/skill_core/hero01_combo01_3.tres | 19 ++ config/skill_core/hero01_remote01.tres | 21 ++ config/skill_core/hero01_slash01.tres | 19 ++ config/skill_monster/monster01_attack01.tres | 12 - .../hero01_basic_air_flash.tres | 11 +- .../hero01_basic_flash.tres | 11 +- .../hero01_common_skill0101.tres | 18 - .../hero01_common_skill0102.tres | 18 - .../hero01_common_skill0103.tres | 18 - .../hero01_common_skill02.tres | 18 - .../hero01_fist_air_attack01.tres | 11 +- .../hero01_fist_air_attack02.tres | 11 +- .../hero01_fist_air_attack03.tres | 11 +- .../hero01_fist_air_skill01.tres | 11 +- .../hero01_fist_attack01.tres | 11 +- .../hero01_fist_attack02.tres | 11 +- .../hero01_fist_attack03.tres | 11 +- .../hero01_fist_attack04.tres | 11 +- .../hero01_fist_attack05.tres | 11 +- .../hero01_long_air_attack01.tres | 12 +- .../hero01_long_air_attack02.tres | 12 +- .../hero01_long_air_attack03.tres | 11 +- .../hero01_long_air_skill01.tres | 11 +- .../hero01_long_air_skill02.tres | 11 +- .../hero01_long_attack01.tres | 12 +- .../hero01_long_attack02.tres | 12 +- .../hero01_long_attack03.tres | 12 +- .../hero01_long_attack04.tres | 11 +- .../hero01_long_skill01.tres | 12 +- .../hero01_long_skill02.tres | 11 +- .../hero01_short_attack01.tres | 12 +- .../hero01_short_attack02.tres | 12 +- .../hero01_short_attack03.tres | 12 +- .../hero01_short_attack04.tres | 12 +- .../hero01_basic_air_flash.tres | 81 ++--- .../skill_animation/hero01_basic_flash.tres | 81 ++--- .../skill_animation/hero01_combo0101.tres | 42 +++ .../skill_animation/hero01_combo0102.tres | 42 +++ .../skill_animation/hero01_combo0103.tres | 43 +++ .../hero01_common_skill03.tres | 92 +++++ .../hero01_fist_air_skill01.tres | 98 +++--- .../hero01_long_air_attack02.tres | 28 +- .../hero01_long_air_attack03.tres | 28 +- resource/skill_animation/hero01_remote01.tres | 93 +++++ resource/skill_animation/hero01_slash01.tres | 43 +++ .../animation_library.tres | 14 +- scene/ai/bullet01.tscn | 28 ++ scene/ai/bullet02.tscn | 28 ++ scene/ai/monster01.tscn | 19 ++ scene/ai/monster02.tscn | 19 ++ scene/character/bullet.tscn | 4 +- scene/character/character.tscn | 13 +- scene/character/monster.tscn | 20 +- scene/character/player.tscn | 9 +- scene/effect/particle/bullet01.tscn | 11 + .../particle/hero01_common_skill03.tscn | 6 + scene/launcher.tscn | 1 - script/_global/enum.gd | 3 +- script/_global/stage.gd | 2 +- script/_global/util.gd | 317 +++++++++--------- script/ai/action/action_attack1.gd | 10 + script/ai/action/action_attack2.gd | 10 + script/ai/action/action_destroy.gd | 7 + script/ai/action/action_find_target.gd | 3 +- script/ai/action/action_stop_move.gd | 7 + .../action_move_to_target.gd | 4 +- script/character/ai/ai.gd | 25 +- script/character/ai/bullet_ai.gd | 9 +- script/character/ai/monster_ai.gd | 2 +- script/character/battle.gd | 60 +++- script/character/character.gd | 16 +- script/character/{player => }/core.gd | 24 +- script/character/effect.gd | 9 +- script/character/move.gd | 2 +- script/character/player/combo.gd | 55 ++- script/character/player/player_action.gd | 6 +- script/character/skill.gd | 27 +- script/character/status.gd | 2 +- script/character/view.gd | 12 +- script/config/character_cfg.gd | 32 ++ script/config/core_cfg.gd | 19 +- script/config/player_skill_cfg.gd | 10 - script/config/skill_cfg.gd | 18 +- script/config/skill_weapon_cfg.gd | 7 + script/editor_tool/editor_tool.gd | 137 ++++---- script/manager/character_manager.gd | 10 +- script/manager/game_manager.gd | 2 - 99 files changed, 1614 insertions(+), 887 deletions(-) create mode 100644 config/attack_box/circle_normal_thin.tres create mode 100644 config/character_move/fast_fly.tres delete mode 100644 config/core/free01.tres delete mode 100644 config/core/free02.tres create mode 100644 config/core/hero01_combo01.tres create mode 100644 config/core/hero01_remote01.tres create mode 100644 config/core/hero01_slash01.tres create mode 100644 config/skill_core/hero01_combo01_1.tres create mode 100644 config/skill_core/hero01_combo01_2.tres create mode 100644 config/skill_core/hero01_combo01_3.tres create mode 100644 config/skill_core/hero01_remote01.tres create mode 100644 config/skill_core/hero01_slash01.tres delete mode 100644 config/skill_monster/monster01_attack01.tres delete mode 100644 config/skill_player_common/hero01_common_skill0101.tres delete mode 100644 config/skill_player_common/hero01_common_skill0102.tres delete mode 100644 config/skill_player_common/hero01_common_skill0103.tres delete mode 100644 config/skill_player_common/hero01_common_skill02.tres create mode 100644 resource/skill_animation/hero01_combo0101.tres create mode 100644 resource/skill_animation/hero01_combo0102.tres create mode 100644 resource/skill_animation/hero01_combo0103.tres create mode 100644 resource/skill_animation/hero01_common_skill03.tres create mode 100644 resource/skill_animation/hero01_remote01.tres create mode 100644 resource/skill_animation/hero01_slash01.tres create mode 100644 scene/ai/bullet01.tscn create mode 100644 scene/ai/bullet02.tscn create mode 100644 scene/ai/monster01.tscn create mode 100644 scene/ai/monster02.tscn create mode 100644 scene/effect/particle/bullet01.tscn create mode 100644 scene/effect/particle/hero01_common_skill03.tscn create mode 100644 script/ai/action/action_attack1.gd create mode 100644 script/ai/action/action_attack2.gd create mode 100644 script/ai/action/action_destroy.gd create mode 100644 script/ai/action/action_stop_move.gd rename script/character/{player => }/core.gd (68%) delete mode 100644 script/config/player_skill_cfg.gd create mode 100644 script/config/skill_weapon_cfg.gd diff --git a/addons/beehave/nodes/beehave_tree.gd b/addons/beehave/nodes/beehave_tree.gd index 7a8d145..409cc76 100644 --- a/addons/beehave/nodes/beehave_tree.gd +++ b/addons/beehave/nodes/beehave_tree.gd @@ -4,9 +4,9 @@ class_name BeehaveTree extends Node enum { - SUCCESS, - FAILURE, - RUNNING + SUCCESS, + FAILURE, + RUNNING } signal tree_enabled @@ -14,18 +14,18 @@ signal tree_disabled ## Wether this behavior tree should be enabled or not. @export var enabled: bool = true: - set(value): - enabled = value - set_physics_process(enabled) + set(value): + enabled = value + set_physics_process(enabled) - if value: - tree_enabled.emit() - else: - interrupt() - tree_disabled.emit() + if value: + tree_enabled.emit() + else: + interrupt() + tree_disabled.emit() - get: - return enabled + get: + return enabled ## An optional node path this behavior tree should apply to. @export_node_path var actor_node_path : NodePath @@ -33,33 +33,33 @@ signal tree_disabled ## Custom blackboard node. An internal blackboard will be used ## if no blackboard is provided explicitly. @export var blackboard:Blackboard: - set(b): - blackboard = b - if blackboard and _internal_blackboard: - remove_child(_internal_blackboard) - _internal_blackboard.free() - _internal_blackboard = null - elif not blackboard and not _internal_blackboard: - _internal_blackboard = Blackboard.new() - add_child(_internal_blackboard, false, Node.INTERNAL_MODE_BACK) - get: - return blackboard if blackboard else _internal_blackboard + set(b): + blackboard = b + if blackboard and _internal_blackboard: + remove_child(_internal_blackboard) + _internal_blackboard.free() + _internal_blackboard = null + elif not blackboard and not _internal_blackboard: + _internal_blackboard = Blackboard.new() + add_child(_internal_blackboard, false, Node.INTERNAL_MODE_BACK) + get: + return blackboard if blackboard else _internal_blackboard ## When enabled, this tree is tracked individually ## as a custom monitor. @export var custom_monitor = false: - set(b): - custom_monitor = b - if custom_monitor and _process_time_metric_name != '': - Performance.add_custom_monitor(_process_time_metric_name, _get_process_time_metric_value) - BeehaveGlobalMetrics.register_tree(self) - else: - if _process_time_metric_name != '': - # Remove tree metric from the engine - Performance.remove_custom_monitor(_process_time_metric_name) - BeehaveGlobalMetrics.unregister_tree(self) - - BeehaveDebuggerMessages.unregister_tree(get_instance_id()) + set(b): + custom_monitor = b + if custom_monitor and _process_time_metric_name != '': + Performance.add_custom_monitor(_process_time_metric_name, _get_process_time_metric_value) + BeehaveGlobalMetrics.register_tree(self) + else: + if _process_time_metric_name != '': + # Remove tree metric from the engine + Performance.remove_custom_monitor(_process_time_metric_name) + BeehaveGlobalMetrics.unregister_tree(self) + + BeehaveDebuggerMessages.unregister_tree(get_instance_id()) var actor : Node var status : int = -1 @@ -70,155 +70,155 @@ var _process_time_metric_value : float = 0.0 var _can_send_message: bool = false func _ready() -> void: - if Engine.is_editor_hint(): - return + if Engine.is_editor_hint(): + return - if self.get_child_count() > 0 and not self.get_child(0) is BeehaveNode: - push_warning("Beehave error: Root %s should have only one child of type BeehaveNode (NodePath: %s)" % [self.name, self.get_path()]) - disable() - return + if self.get_child_count() > 0 and not self.get_child(0) is BeehaveNode: + push_warning("Beehave error: Root %s should have only one child of type BeehaveNode (NodePath: %s)" % [self.name, self.get_path()]) + disable() + return - if not blackboard: - _internal_blackboard = Blackboard.new() - add_child(_internal_blackboard, false, Node.INTERNAL_MODE_BACK) + if not blackboard: + _internal_blackboard = Blackboard.new() + add_child(_internal_blackboard, false, Node.INTERNAL_MODE_BACK) - actor = get_parent() - if actor_node_path: - actor = get_node(actor_node_path) + actor = get_parent() + if actor_node_path: + actor = get_node(actor_node_path) - # Get the name of the parent node name for metric - var parent_name = actor.name - _process_time_metric_name = "beehave [microseconds]/process_time_%s-%s" % [parent_name, get_instance_id()] + # Get the name of the parent node name for metric + var parent_name = actor.name + _process_time_metric_name = "beehave [microseconds]/process_time_%s-%s" % [parent_name, get_instance_id()] - # Register custom metric to the engine - if custom_monitor: - Performance.add_custom_monitor(_process_time_metric_name, _get_process_time_metric_value) - BeehaveGlobalMetrics.register_tree(self) + # Register custom metric to the engine + if custom_monitor: + Performance.add_custom_monitor(_process_time_metric_name, _get_process_time_metric_value) + BeehaveGlobalMetrics.register_tree(self) - set_physics_process(enabled) - BeehaveGlobalDebugger.register_tree(self) - BeehaveDebuggerMessages.register_tree(_get_debugger_data(self)) + set_physics_process(enabled) + BeehaveGlobalDebugger.register_tree(self) + BeehaveDebuggerMessages.register_tree(_get_debugger_data(self)) func _physics_process(delta: float) -> void: - if Engine.is_editor_hint(): - return + if Engine.is_editor_hint(): + return - # Start timing for metric - var start_time = Time.get_ticks_usec() + # Start timing for metric + var start_time = Time.get_ticks_usec() - blackboard.set_value("can_send_message", _can_send_message) + blackboard.set_value("can_send_message", _can_send_message) - if _can_send_message: - BeehaveDebuggerMessages.process_begin(get_instance_id()) + if _can_send_message: + BeehaveDebuggerMessages.process_begin(get_instance_id()) - if self.get_child_count() == 1: - tick() + if self.get_child_count() == 1: + tick() - if _can_send_message: - BeehaveDebuggerMessages.process_end(get_instance_id()) + if _can_send_message: + BeehaveDebuggerMessages.process_end(get_instance_id()) - # Check the cost for this frame and save it for metric report - _process_time_metric_value = Time.get_ticks_usec() - start_time + # Check the cost for this frame and save it for metric report + _process_time_metric_value = Time.get_ticks_usec() - start_time func tick() -> int: - var child := self.get_child(0) - if status != RUNNING: - child.before_run(actor, blackboard) + var child := self.get_child(0) + if status != RUNNING: + child.before_run(actor, blackboard) - status = child.tick(actor, blackboard) - if _can_send_message: - BeehaveDebuggerMessages.process_tick(child.get_instance_id(), status) - BeehaveDebuggerMessages.process_tick(get_instance_id(), status) + status = child.tick(actor, blackboard) + if _can_send_message: + BeehaveDebuggerMessages.process_tick(child.get_instance_id(), status) + BeehaveDebuggerMessages.process_tick(get_instance_id(), status) - # Clear running action if nothing is running - if status != RUNNING: - blackboard.set_value("running_action", null, str(actor.get_instance_id())) - child.after_run(actor, blackboard) + # Clear running action if nothing is running + if status != RUNNING: + blackboard.set_value("running_action", null, str(actor.get_instance_id())) + child.after_run(actor, blackboard) - return status + return status func _get_configuration_warnings() -> PackedStringArray: - var warnings:PackedStringArray = [] + var warnings:PackedStringArray = [] - if get_children().any(func(x): return not (x is BeehaveNode)): - warnings.append("All children of this node should inherit from BeehaveNode class.") + if get_children().any(func(x): return not (x is BeehaveNode)): + warnings.append("All children of this node should inherit from BeehaveNode class.") - if get_child_count() != 1: - warnings.append("BeehaveTree should have exactly one child node.") + if get_child_count() != 1: + warnings.append("BeehaveTree should have exactly one child node.") - return warnings + return warnings ## Returns the currently running action func get_running_action() -> ActionLeaf: - return blackboard.get_value("running_action", null, str(actor.get_instance_id())) + return blackboard.get_value("running_action", null, str(actor.get_instance_id())) ## Returns the last condition that was executed func get_last_condition() -> ConditionLeaf: - return blackboard.get_value("last_condition", null, str(actor.get_instance_id())) + return blackboard.get_value("last_condition", null, str(actor.get_instance_id())) ## Returns the status of the last executed condition func get_last_condition_status() -> String: - if blackboard.has_value("last_condition_status", str(actor.get_instance_id())): - var status = blackboard.get_value("last_condition_status", null, str(actor.get_instance_id())) - if status == SUCCESS: - return "SUCCESS" - elif status == FAILURE: - return "FAILURE" - else: - return "RUNNING" - return "" + if blackboard.has_value("last_condition_status", str(actor.get_instance_id())): + var status = blackboard.get_value("last_condition_status", null, str(actor.get_instance_id())) + if status == SUCCESS: + return "SUCCESS" + elif status == FAILURE: + return "FAILURE" + else: + return "RUNNING" + return "" ## interrupts this tree if anything was running func interrupt() -> void: - if self.get_child_count() != 0: - var first_child = self.get_child(0) - if "interrupt" in first_child: - first_child.interrupt(actor, blackboard) + if self.get_child_count() != 0: + var first_child = self.get_child(0) + if "interrupt" in first_child: + first_child.interrupt(actor, blackboard) ## Enables this tree. func enable() -> void: - self.enabled = true + self.enabled = true ## Disables this tree. func disable() -> void: - self.enabled = false + self.enabled = false func _exit_tree() -> void: - if custom_monitor: - if _process_time_metric_name != '': - # Remove tree metric from the engine - Performance.remove_custom_monitor(_process_time_metric_name) - BeehaveGlobalMetrics.unregister_tree(self) + if custom_monitor: + if _process_time_metric_name != '': + # Remove tree metric from the engine + Performance.remove_custom_monitor(_process_time_metric_name) + BeehaveGlobalMetrics.unregister_tree(self) - BeehaveDebuggerMessages.unregister_tree(get_instance_id()) + BeehaveDebuggerMessages.unregister_tree(get_instance_id()) # Called by the engine to profile this tree func _get_process_time_metric_value() -> int: - return _process_time_metric_value + return _process_time_metric_value func _get_debugger_data(node: Node) -> Dictionary: - if not node is BeehaveTree and not node is BeehaveNode: - return {} - var data := { path = node.get_path(), name = node.name, type = node.get_class_name(), id = str(node.get_instance_id()) } - if node.get_child_count() > 0: - data.children = [] - for child in node.get_children(): - var child_data := _get_debugger_data(child) - if not child_data.is_empty(): - data.children.push_back(child_data) - return data + if not node is BeehaveTree and not node is BeehaveNode: + return {} + var data := { path = node.get_path(), name = node.name, type = node.get_class_name(), id = str(node.get_instance_id()) } + if node.get_child_count() > 0: + data.children = [] + for child in node.get_children(): + var child_data := _get_debugger_data(child) + if not child_data.is_empty(): + data.children.push_back(child_data) + return data func get_class_name() -> Array[StringName]: - return [&"BeehaveTree"] + return [&"BeehaveTree"] diff --git a/config/attack_box/circle_normal_thin.tres b/config/attack_box/circle_normal_thin.tres new file mode 100644 index 0000000..8971dbe --- /dev/null +++ b/config/attack_box/circle_normal_thin.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="AttackBoxCfg" load_steps=3 format=3 uid="uid://bhxq1uffxyda8"] + +[ext_resource type="Script" path="res://script/config/attack_box_cfg.gd" id="1_gwkwy"] + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_pmh6g"] +height = 0.25 + +[resource] +script = ExtResource("1_gwkwy") +shape = SubResource("CylinderShape3D_pmh6g") +offset = Vector2(0, 0.5) diff --git a/config/character/bullet01.tres b/config/character/bullet01.tres index 7fa79e9..0a651be 100644 --- a/config/character/bullet01.tres +++ b/config/character/bullet01.tres @@ -1,22 +1,24 @@ -[gd_resource type="Resource" script_class="CharacterCfg" load_steps=7 format=3 uid="uid://efaynwj7143w"] +[gd_resource type="Resource" script_class="CharacterCfg" load_steps=8 format=3 uid="uid://efaynwj7143w"] -[ext_resource type="Resource" uid="uid://dfyg6ye7n3wgj" path="res://config/character_move/fast.tres" id="1_b02yl"] +[ext_resource type="Resource" uid="uid://ctbdt77yyubxn" path="res://config/attack/blunt_normal_hit_up.tres" id="1_4vq22"] +[ext_resource type="Resource" uid="uid://bhxq1uffxyda8" path="res://config/attack_box/circle_normal_thin.tres" id="2_ewiqr"] [ext_resource type="Resource" uid="uid://dpajmgrlaytah" path="res://config/character_mp/normal.tres" id="2_hrxfp"] +[ext_resource type="Resource" uid="uid://iv8g1x3bkxvv" path="res://config/character_move/fast_fly.tres" id="3_gqffj"] [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="3_p63bn"] [ext_resource type="Resource" uid="uid://h1curvk64vm3" path="res://config/character_shield/none.tres" id="4_qnn3b"] -[ext_resource type="SpriteFrames" uid="uid://i01jiylcqat" path="res://resource/animation/character/bullet01_move.aseprite" id="4_x87ux"] [ext_resource type="Resource" uid="uid://5jes0p152akr" path="res://config/character_stun/none.tres" id="6_y4hsh"] [resource] script = ExtResource("3_p63bn") name = "hero01" type = 2 -sprite_frames = ExtResource("4_x87ux") -sprite_harf_height = 16 -sprite_width = 8 -move = ExtResource("1_b02yl") +sprite_harf_height = 26 +sprite_width = 16 +move = ExtResource("3_gqffj") shield = ExtResource("4_qnn3b") stun = ExtResource("6_y4hsh") mp = ExtResource("2_hrxfp") hp_max = 100.0 attack = 10.0 +attack1 = ExtResource("1_4vq22") +attack1_box = ExtResource("2_ewiqr") diff --git a/config/character_move/fast.tres b/config/character_move/fast.tres index 06fc9b1..4835549 100644 --- a/config/character_move/fast.tres +++ b/config/character_move/fast.tres @@ -4,6 +4,6 @@ [resource] script = ExtResource("1_vw5kv") -speed = 5.0 +speed = 7.0 gravity_scale = 1.0 jump_velocity = 6.0 diff --git a/config/character_move/fast_fly.tres b/config/character_move/fast_fly.tres new file mode 100644 index 0000000..ae494be --- /dev/null +++ b/config/character_move/fast_fly.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" script_class="CharacterMoveCfg" load_steps=2 format=3 uid="uid://iv8g1x3bkxvv"] + +[ext_resource type="Script" path="res://script/config/character_move_cfg.gd" id="1_74gbk"] + +[resource] +script = ExtResource("1_74gbk") +speed = 10.0 +gravity_scale = 0.0 +jump_velocity = 6.0 diff --git a/config/core/free01.tres b/config/core/free01.tres deleted file mode 100644 index 1bbf2ce..0000000 --- a/config/core/free01.tres +++ /dev/null @@ -1,13 +0,0 @@ -[gd_resource type="Resource" script_class="CoreCfg" load_steps=6 format=3 uid="uid://chx14f0ty3usd"] - -[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_v24ds"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_flpwm"] -[ext_resource type="Resource" uid="uid://cuwtxibg84nno" path="res://config/skill_player_common/hero01_common_skill0101.tres" id="3_oj1qu"] -[ext_resource type="Resource" uid="uid://lr1iguojoyk" path="res://config/skill_player_common/hero01_common_skill0102.tres" id="4_we7wm"] -[ext_resource type="Resource" uid="uid://b8b1afegmabx6" path="res://config/skill_player_common/hero01_common_skill0103.tres" id="5_1xn4f"] - -[resource] -script = ExtResource("1_v24ds") -name = "" -type = 0 -skill_list = Array[ExtResource("2_flpwm")]([ExtResource("3_oj1qu"), ExtResource("4_we7wm"), ExtResource("5_1xn4f")]) diff --git a/config/core/free02.tres b/config/core/free02.tres deleted file mode 100644 index 162f8b7..0000000 --- a/config/core/free02.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="Resource" script_class="CoreCfg" load_steps=4 format=3 uid="uid://djwu1qw3irbmj"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_4x1h6"] -[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="2_glcvn"] -[ext_resource type="Resource" uid="uid://iyqp5jwc75b1" path="res://config/skill_player_common/hero01_common_skill02.tres" id="3_phy5g"] - -[resource] -script = ExtResource("2_glcvn") -name = "" -type = 0 -skill_list = Array[ExtResource("2_4x1h6")]([ExtResource("3_phy5g")]) diff --git a/config/core/hero01_combo01.tres b/config/core/hero01_combo01.tres new file mode 100644 index 0000000..d3a46a2 --- /dev/null +++ b/config/core/hero01_combo01.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://chx14f0ty3usd"] + +[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_xylg2"] + +[resource] +script = ExtResource("1_xylg2") +name = "" +type = 2 diff --git a/config/core/hero01_remote01.tres b/config/core/hero01_remote01.tres new file mode 100644 index 0000000..68363f5 --- /dev/null +++ b/config/core/hero01_remote01.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="CoreCfg" load_steps=3 format=3 uid="uid://c5h02ni8psoxq"] + +[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_rsjym"] + +[resource] +script = ExtResource("1_rsjym") +name = "" +type = 2 diff --git a/config/core/hero01_slash01.tres b/config/core/hero01_slash01.tres new file mode 100644 index 0000000..11a9265 --- /dev/null +++ b/config/core/hero01_slash01.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" script_class="CoreCfg" load_steps=4 format=3 uid="uid://djwu1qw3irbmj"] + +[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="2_glcvn"] + +[resource] +script = ExtResource("2_glcvn") +name = "" +type = 2 diff --git a/config/skill_core/hero01_combo01_1.tres b/config/skill_core/hero01_combo01_1.tres new file mode 100644 index 0000000..7e89cbd --- /dev/null +++ b/config/skill_core/hero01_combo01_1.tres @@ -0,0 +1,19 @@ +[gd_resource type="Resource" script_class="SkillCfg" load_steps=4 format=3 uid="uid://cuwtxibg84nno"] + +[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_702bi"] +[ext_resource type="Animation" uid="uid://kfvqej1q5iqa" path="res://resource/skill_animation/hero01_combo0101.tres" id="2_nm2wy"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_ppacp"] + +[resource] +script = ExtResource("1_702bi") +name = "" +skill_animation = ExtResource("2_nm2wy") +range = 0.0 +free_lock = false +ignore_push = false +stance_from = 100 +stance_to = 2 +break_level = 3 +refresh_animation = false +sprite_frames = ExtResource("3_ppacp") +animation_name = "long_attack01" diff --git a/config/skill_core/hero01_combo01_2.tres b/config/skill_core/hero01_combo01_2.tres new file mode 100644 index 0000000..3cf2659 --- /dev/null +++ b/config/skill_core/hero01_combo01_2.tres @@ -0,0 +1,19 @@ +[gd_resource type="Resource" script_class="SkillCfg" load_steps=4 format=3 uid="uid://lr1iguojoyk"] + +[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_42tyl"] +[ext_resource type="Animation" uid="uid://cvxifa2uac5oc" path="res://resource/skill_animation/hero01_combo0102.tres" id="2_bm5gt"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_11afq"] + +[resource] +script = ExtResource("1_42tyl") +name = "" +skill_animation = ExtResource("2_bm5gt") +range = 0.0 +free_lock = false +ignore_push = false +stance_from = 100 +stance_to = 3 +break_level = 1 +refresh_animation = false +sprite_frames = ExtResource("3_11afq") +animation_name = "long_attack02" diff --git a/config/skill_core/hero01_combo01_3.tres b/config/skill_core/hero01_combo01_3.tres new file mode 100644 index 0000000..a526078 --- /dev/null +++ b/config/skill_core/hero01_combo01_3.tres @@ -0,0 +1,19 @@ +[gd_resource type="Resource" script_class="SkillCfg" load_steps=4 format=3 uid="uid://b8b1afegmabx6"] + +[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_uhj5t"] +[ext_resource type="Animation" uid="uid://cqc30d5uqi2my" path="res://resource/skill_animation/hero01_combo0103.tres" id="2_rvklk"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_2hchk"] + +[resource] +script = ExtResource("1_uhj5t") +name = "" +skill_animation = ExtResource("2_rvklk") +range = 0.0 +free_lock = false +ignore_push = false +stance_from = 100 +stance_to = 4 +break_level = 1 +refresh_animation = false +sprite_frames = ExtResource("3_2hchk") +animation_name = "long_attack03" diff --git a/config/skill_core/hero01_remote01.tres b/config/skill_core/hero01_remote01.tres new file mode 100644 index 0000000..6baea88 --- /dev/null +++ b/config/skill_core/hero01_remote01.tres @@ -0,0 +1,21 @@ +[gd_resource type="Resource" script_class="SkillCfg" load_steps=5 format=3 uid="uid://cwvj0xsv61cjk"] + +[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_doifq"] +[ext_resource type="Animation" uid="uid://h8hm3kbecdx8" path="res://resource/skill_animation/hero01_remote01.tres" id="2_h285p"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w10pb"] +[ext_resource type="Resource" uid="uid://efaynwj7143w" path="res://config/character/bullet01.tres" id="4_bu37n"] + +[resource] +script = ExtResource("1_doifq") +name = "" +skill_animation = ExtResource("2_h285p") +range = 0.0 +free_lock = false +ignore_push = false +sub_character = ExtResource("4_bu37n") +stance_from = 102 +stance_to = 0 +break_level = 3 +refresh_animation = false +sprite_frames = ExtResource("3_w10pb") +animation_name = "long_attack01" diff --git a/config/skill_core/hero01_slash01.tres b/config/skill_core/hero01_slash01.tres new file mode 100644 index 0000000..63ab5b6 --- /dev/null +++ b/config/skill_core/hero01_slash01.tres @@ -0,0 +1,19 @@ +[gd_resource type="Resource" script_class="SkillCfg" load_steps=4 format=3 uid="uid://iyqp5jwc75b1"] + +[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_e1byx"] +[ext_resource type="Animation" uid="uid://q7qlw0a7hfjt" path="res://resource/skill_animation/hero01_slash01.tres" id="2_1txbl"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_roc1y"] + +[resource] +script = ExtResource("1_e1byx") +name = "" +skill_animation = ExtResource("2_1txbl") +range = 0.0 +free_lock = false +ignore_push = false +stance_from = 100 +stance_to = 4 +break_level = 3 +refresh_animation = false +sprite_frames = ExtResource("3_roc1y") +animation_name = "long_attack04" diff --git a/config/skill_monster/monster01_attack01.tres b/config/skill_monster/monster01_attack01.tres deleted file mode 100644 index 3bc4f99..0000000 --- a/config/skill_monster/monster01_attack01.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="Resource" script_class="SkillCfg" load_steps=3 format=3 uid="uid://bohydsbv7kxu3"] - -[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="1_r8y6y"] -[ext_resource type="Animation" uid="uid://b8ypa7uw0uam5" path="res://resource/skill_animation/monster01_attack01.tres" id="2_hmrt4"] - -[resource] -script = ExtResource("1_r8y6y") -name = "" -skill_animation = ExtResource("2_hmrt4") -free_lock = false -refresh_animation = false -animation_name = "attack01" diff --git a/config/skill_player_basic/hero01_basic_air_flash.tres b/config/skill_player_basic/hero01_basic_air_flash.tres index 13b31cb..33b5ed0 100644 --- a/config/skill_player_basic/hero01_basic_air_flash.tres +++ b/config/skill_player_basic/hero01_basic_air_flash.tres @@ -1,19 +1,20 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_blorc"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_blorc"] [ext_resource type="Animation" uid="uid://73awn8b7c63v" path="res://resource/skill_animation/hero01_basic_air_flash.tres" id="2_sx5x4"] [ext_resource type="SpriteFrames" uid="uid://jpxh0jr8wp8g" path="res://resource/animation/character/hero01_basic.aseprite" id="3_ciqr7"] [resource] script = ExtResource("1_blorc") -stance_from = 101 -stance_to = 10 -break_level = 1 action = "flash" name = "" skill_animation = ExtResource("2_sx5x4") +range = 0.0 free_lock = true ignore_push = true +stance_from = 101 +stance_to = 10 +break_level = 1 refresh_animation = false sprite_frames = ExtResource("3_ciqr7") animation_name = "basic_air_flash" diff --git a/config/skill_player_basic/hero01_basic_flash.tres b/config/skill_player_basic/hero01_basic_flash.tres index 6760773..238c26e 100644 --- a/config/skill_player_basic/hero01_basic_flash.tres +++ b/config/skill_player_basic/hero01_basic_flash.tres @@ -1,19 +1,20 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_raqfe"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_raqfe"] [ext_resource type="Animation" uid="uid://cfapnjkj5dkws" path="res://resource/skill_animation/hero01_basic_flash.tres" id="2_31kka"] [ext_resource type="SpriteFrames" uid="uid://jpxh0jr8wp8g" path="res://resource/animation/character/hero01_basic.aseprite" id="3_i6jjr"] [resource] script = ExtResource("1_raqfe") -stance_from = 100 -stance_to = 0 -break_level = 1 action = "flash" name = "" skill_animation = ExtResource("2_31kka") +range = 0.0 free_lock = true ignore_push = true +stance_from = 100 +stance_to = 0 +break_level = 1 refresh_animation = false sprite_frames = ExtResource("3_i6jjr") animation_name = "basic_flash" diff --git a/config/skill_player_common/hero01_common_skill0101.tres b/config/skill_player_common/hero01_common_skill0101.tres deleted file mode 100644 index 17e5099..0000000 --- a/config/skill_player_common/hero01_common_skill0101.tres +++ /dev/null @@ -1,18 +0,0 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://cuwtxibg84nno"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_702bi"] -[ext_resource type="Animation" uid="uid://dokxns0q44rux" path="res://resource/skill_animation/hero01_common_skill0101.tres" id="2_o71rh"] -[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_ppacp"] - -[resource] -script = ExtResource("1_702bi") -stance_from = 100 -stance_to = 2 -break_level = 3 -action = "none" -name = "" -skill_animation = ExtResource("2_o71rh") -free_lock = false -refresh_animation = false -sprite_frames = ExtResource("3_ppacp") -animation_name = "long_attack01" diff --git a/config/skill_player_common/hero01_common_skill0102.tres b/config/skill_player_common/hero01_common_skill0102.tres deleted file mode 100644 index 3aa1f13..0000000 --- a/config/skill_player_common/hero01_common_skill0102.tres +++ /dev/null @@ -1,18 +0,0 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://lr1iguojoyk"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_42tyl"] -[ext_resource type="Animation" uid="uid://d0rn5wwwnu4oh" path="res://resource/skill_animation/hero01_common_skill0102.tres" id="2_ar1pk"] -[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_11afq"] - -[resource] -script = ExtResource("1_42tyl") -stance_from = 100 -stance_to = 3 -break_level = 1 -action = "none" -name = "" -skill_animation = ExtResource("2_ar1pk") -free_lock = false -refresh_animation = false -sprite_frames = ExtResource("3_11afq") -animation_name = "long_attack02" diff --git a/config/skill_player_common/hero01_common_skill0103.tres b/config/skill_player_common/hero01_common_skill0103.tres deleted file mode 100644 index 0c106b7..0000000 --- a/config/skill_player_common/hero01_common_skill0103.tres +++ /dev/null @@ -1,18 +0,0 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://b8b1afegmabx6"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uhj5t"] -[ext_resource type="Animation" uid="uid://cm4c0rwh0mqn4" path="res://resource/skill_animation/hero01_common_skill0103.tres" id="2_breja"] -[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_2hchk"] - -[resource] -script = ExtResource("1_uhj5t") -stance_from = 100 -stance_to = 4 -break_level = 1 -action = "none" -name = "" -skill_animation = ExtResource("2_breja") -free_lock = false -refresh_animation = false -sprite_frames = ExtResource("3_2hchk") -animation_name = "long_attack03" diff --git a/config/skill_player_common/hero01_common_skill02.tres b/config/skill_player_common/hero01_common_skill02.tres deleted file mode 100644 index b85e9d2..0000000 --- a/config/skill_player_common/hero01_common_skill02.tres +++ /dev/null @@ -1,18 +0,0 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://iyqp5jwc75b1"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_e1byx"] -[ext_resource type="Animation" uid="uid://dkkqys8el1u6g" path="res://resource/skill_animation/hero01_common_skill02.tres" id="2_n2c7s"] -[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_roc1y"] - -[resource] -script = ExtResource("1_e1byx") -stance_from = 100 -stance_to = 4 -break_level = 3 -action = "none" -name = "" -skill_animation = ExtResource("2_n2c7s") -free_lock = false -refresh_animation = false -sprite_frames = ExtResource("3_roc1y") -animation_name = "long_attack04" diff --git a/config/skill_player_weapon/hero01_fist_air_attack01.tres b/config/skill_player_weapon/hero01_fist_air_attack01.tres index e1b41a9..43b9738 100644 --- a/config/skill_player_weapon/hero01_fist_air_attack01.tres +++ b/config/skill_player_weapon/hero01_fist_air_attack01.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://hg7aptg0wl1j"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://hg7aptg0wl1j"] [ext_resource type="Resource" uid="uid://dib6g7t6p5ac2" path="res://config/attack/blunt_normal_hit.tres" id="1_v7ajo"] [ext_resource type="Resource" uid="uid://dja8jwx16njmf" path="res://config/attack_box/box_small.tres" id="2_ipoga"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_v1wiv"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_v1wiv"] [ext_resource type="Animation" uid="uid://chj3rlh6krt66" path="res://resource/skill_animation/hero01_fist_air_attack01.tres" id="4_nfkff"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="5_7yyxp"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="6_aclp5"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("3_v1wiv") weapon = ExtResource("6_aclp5") -stance_from = 10 -stance_to = 11 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_nfkff") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_v7ajo") attack1_box = ExtResource("2_ipoga") +stance_from = 10 +stance_to = 11 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_7yyxp") animation_name = "fist_air_attack01" diff --git a/config/skill_player_weapon/hero01_fist_air_attack02.tres b/config/skill_player_weapon/hero01_fist_air_attack02.tres index c4d9ee4..c011f86 100644 --- a/config/skill_player_weapon/hero01_fist_air_attack02.tres +++ b/config/skill_player_weapon/hero01_fist_air_attack02.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://d1q7buaerirow"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://d1q7buaerirow"] [ext_resource type="Resource" uid="uid://dib6g7t6p5ac2" path="res://config/attack/blunt_normal_hit.tres" id="1_cut8n"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_bgip4"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_agxba"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_agxba"] [ext_resource type="Animation" uid="uid://dia1xwl6foafg" path="res://resource/skill_animation/hero01_fist_air_attack02.tres" id="4_jbb00"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="5_byipk"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="6_ad202"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("3_agxba") weapon = ExtResource("6_ad202") -stance_from = 11 -stance_to = 12 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_jbb00") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_cut8n") attack1_box = ExtResource("2_bgip4") +stance_from = 11 +stance_to = 12 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_byipk") animation_name = "fist_air_attack02" diff --git a/config/skill_player_weapon/hero01_fist_air_attack03.tres b/config/skill_player_weapon/hero01_fist_air_attack03.tres index 126cf19..61520cd 100644 --- a/config/skill_player_weapon/hero01_fist_air_attack03.tres +++ b/config/skill_player_weapon/hero01_fist_air_attack03.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://0nysxqwoq5tj"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://0nysxqwoq5tj"] [ext_resource type="Resource" uid="uid://dr70nrjjk754r" path="res://config/attack/blunt_mid_hit_down.tres" id="1_w8lg4"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_2gnst"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_ghxjs"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_ghxjs"] [ext_resource type="Animation" uid="uid://dfe8krunqdf3m" path="res://resource/skill_animation/hero01_fist_air_attack03.tres" id="4_y802t"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="5_pslv2"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="6_t7m8t"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("3_ghxjs") weapon = ExtResource("6_t7m8t") -stance_from = 12 -stance_to = 13 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_y802t") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_w8lg4") attack1_box = ExtResource("2_2gnst") +stance_from = 12 +stance_to = 13 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_pslv2") animation_name = "fist_air_attack03" diff --git a/config/skill_player_weapon/hero01_fist_air_skill01.tres b/config/skill_player_weapon/hero01_fist_air_skill01.tres index 439198a..57b70ba 100644 --- a/config/skill_player_weapon/hero01_fist_air_skill01.tres +++ b/config/skill_player_weapon/hero01_fist_air_skill01.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=9 format=3 uid="uid://dkxgra6y2u30l"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=9 format=3 uid="uid://dkxgra6y2u30l"] [ext_resource type="Resource" uid="uid://by6jd5xqjml2m" path="res://config/attack/blunt_starfall_1.tres" id="1_p1fp6"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_mje6b"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_mje6b"] [ext_resource type="Resource" uid="uid://57sukcw6ewqo" path="res://config/attack_box/circle_normal.tres" id="2_nvq3h"] [ext_resource type="Resource" uid="uid://d26ok8as50xe5" path="res://config/attack/blunt_starfall_2.tres" id="3_ffp0l"] [ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="3_q461t"] @@ -12,18 +12,19 @@ [resource] script = ExtResource("2_mje6b") weapon = ExtResource("5_70pp4") -stance_from = 10 -stance_to = 0 -break_level = 3 action = "attack_heavy" name = "" skill_animation = ExtResource("3_q461t") +range = 0.0 free_lock = false ignore_push = true attack1 = ExtResource("1_p1fp6") attack1_box = ExtResource("2_nvq3h") attack2 = ExtResource("3_ffp0l") attack2_box = ExtResource("4_13pbo") +stance_from = 10 +stance_to = 0 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_seudu") animation_name = "fist_air_skill01" diff --git a/config/skill_player_weapon/hero01_fist_attack01.tres b/config/skill_player_weapon/hero01_fist_attack01.tres index a852cac..847f885 100644 --- a/config/skill_player_weapon/hero01_fist_attack01.tres +++ b/config/skill_player_weapon/hero01_fist_attack01.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://7e4fnj5sg72s"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://7e4fnj5sg72s"] [ext_resource type="Resource" uid="uid://dib6g7t6p5ac2" path="res://config/attack/blunt_normal_hit.tres" id="1_k0cmy"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_ixt4v"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_yc8jq"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_yc8jq"] [ext_resource type="Animation" uid="uid://t01a4jvp8srr" path="res://resource/skill_animation/hero01_fist_attack01.tres" id="3_b2pdb"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="4_ymqrn"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="5_0ynk7"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_yc8jq") weapon = ExtResource("5_0ynk7") -stance_from = 0 -stance_to = 1 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_b2pdb") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_k0cmy") attack1_box = ExtResource("2_ixt4v") +stance_from = 0 +stance_to = 1 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_ymqrn") animation_name = "fist_attack01" diff --git a/config/skill_player_weapon/hero01_fist_attack02.tres b/config/skill_player_weapon/hero01_fist_attack02.tres index c33d3ff..4910526 100644 --- a/config/skill_player_weapon/hero01_fist_attack02.tres +++ b/config/skill_player_weapon/hero01_fist_attack02.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://dubkvm86cj32f"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://dubkvm86cj32f"] [ext_resource type="Resource" uid="uid://c87w2x5qfqdns" path="res://config/attack/blunt_normal_hit_back.tres" id="1_ixy7x"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_h70wx"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_h70wx"] [ext_resource type="Resource" uid="uid://dja8jwx16njmf" path="res://config/attack_box/box_small.tres" id="2_wc71d"] [ext_resource type="Animation" uid="uid://cyu0yin1rpiak" path="res://resource/skill_animation/hero01_fist_attack02.tres" id="3_tllt1"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="4_fevaa"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_h70wx") weapon = ExtResource("5_gliie") -stance_from = 1 -stance_to = 2 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_tllt1") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_ixy7x") attack1_box = ExtResource("2_wc71d") +stance_from = 1 +stance_to = 2 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_fevaa") animation_name = "fist_attack02" diff --git a/config/skill_player_weapon/hero01_fist_attack03.tres b/config/skill_player_weapon/hero01_fist_attack03.tres index c189ff7..7a80892 100644 --- a/config/skill_player_weapon/hero01_fist_attack03.tres +++ b/config/skill_player_weapon/hero01_fist_attack03.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://dekpkk8o6o8hk"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://dekpkk8o6o8hk"] [ext_resource type="Resource" uid="uid://duu05cr8gk5v4" path="res://config/attack/blunt_mid_hit_blow.tres" id="1_am4eq"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_fde7v"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_fde7v"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_ja1d4"] [ext_resource type="Animation" uid="uid://c6mk8tfdpniys" path="res://resource/skill_animation/hero01_fist_attack03.tres" id="3_6rajt"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="4_orcy6"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_fde7v") weapon = ExtResource("5_r5lmk") -stance_from = 2 -stance_to = 3 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_6rajt") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_am4eq") attack1_box = ExtResource("2_ja1d4") +stance_from = 2 +stance_to = 3 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_orcy6") animation_name = "fist_attack03" diff --git a/config/skill_player_weapon/hero01_fist_attack04.tres b/config/skill_player_weapon/hero01_fist_attack04.tres index a264825..c27a818 100644 --- a/config/skill_player_weapon/hero01_fist_attack04.tres +++ b/config/skill_player_weapon/hero01_fist_attack04.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://b4aysymwqtvtd"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://b4aysymwqtvtd"] [ext_resource type="Resource" uid="uid://duu05cr8gk5v4" path="res://config/attack/blunt_mid_hit_blow.tres" id="1_s12sc"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_0lps6"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_mhuew"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_mhuew"] [ext_resource type="Animation" uid="uid://6u3dhxly760l" path="res://resource/skill_animation/hero01_fist_attack04.tres" id="3_bst70"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="4_hyek5"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="5_gn3tt"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_mhuew") weapon = ExtResource("5_gn3tt") -stance_from = 3 -stance_to = 4 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_bst70") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_s12sc") attack1_box = ExtResource("2_0lps6") +stance_from = 3 +stance_to = 4 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_hyek5") animation_name = "fist_attack04" diff --git a/config/skill_player_weapon/hero01_fist_attack05.tres b/config/skill_player_weapon/hero01_fist_attack05.tres index 364958f..484d677 100644 --- a/config/skill_player_weapon/hero01_fist_attack05.tres +++ b/config/skill_player_weapon/hero01_fist_attack05.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://0n2jnkdrwa2l"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://0n2jnkdrwa2l"] [ext_resource type="Resource" uid="uid://bwe8xlgfhx1gl" path="res://config/attack/blunt_heavy_hit_blow.tres" id="1_5lwhl"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_xua7v"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_ym7q1"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_ym7q1"] [ext_resource type="Animation" uid="uid://b2xdmgnem1h4g" path="res://resource/skill_animation/hero01_fist_attack05.tres" id="3_dbjmb"] [ext_resource type="SpriteFrames" uid="uid://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="4_mhr07"] [ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="5_en30r"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_ym7q1") weapon = ExtResource("5_en30r") -stance_from = 4 -stance_to = 5 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_dbjmb") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_5lwhl") attack1_box = ExtResource("2_xua7v") +stance_from = 4 +stance_to = 5 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_mhr07") animation_name = "fist_attack05" diff --git a/config/skill_player_weapon/hero01_long_air_attack01.tres b/config/skill_player_weapon/hero01_long_air_attack01.tres index 16f5a54..0d590dc 100644 --- a/config/skill_player_weapon/hero01_long_air_attack01.tres +++ b/config/skill_player_weapon/hero01_long_air_attack01.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://rib7hj11oscr"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://rib7hj11oscr"] [ext_resource type="Resource" uid="uid://d3mcp8sf6qbmd" path="res://config/attack/sharp_normal_hit.tres" id="1_mxlqc"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_hh5ph"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_hh5ph"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_nk4i8"] [ext_resource type="Animation" uid="uid://p8l0puqxrkwh" path="res://resource/skill_animation/hero01_long_air_attack01.tres" id="3_3pp8a"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_q0bln"] @@ -10,15 +10,17 @@ [resource] script = ExtResource("2_hh5ph") weapon = ExtResource("5_s1k6m") -stance_from = 10 -stance_to = 11 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_3pp8a") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_mxlqc") attack1_box = ExtResource("2_nk4i8") +stance_from = 10 +stance_to = 11 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_q0bln") animation_name = "long_air_attack01" diff --git a/config/skill_player_weapon/hero01_long_air_attack02.tres b/config/skill_player_weapon/hero01_long_air_attack02.tres index 93731e0..1af2a88 100644 --- a/config/skill_player_weapon/hero01_long_air_attack02.tres +++ b/config/skill_player_weapon/hero01_long_air_attack02.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://c675lckg7ly25"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://c675lckg7ly25"] [ext_resource type="Resource" uid="uid://d3mcp8sf6qbmd" path="res://config/attack/sharp_normal_hit.tres" id="1_qfkyy"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_gjjhv"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_gjjhv"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_xxivk"] [ext_resource type="Animation" uid="uid://cjfy6ia1ukyiu" path="res://resource/skill_animation/hero01_long_air_attack02.tres" id="3_76yga"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_ahm2t"] @@ -10,15 +10,17 @@ [resource] script = ExtResource("2_gjjhv") weapon = ExtResource("5_nkec4") -stance_from = 11 -stance_to = 12 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_76yga") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_qfkyy") attack1_box = ExtResource("2_xxivk") +stance_from = 11 +stance_to = 12 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_ahm2t") animation_name = "long_air_attack02" diff --git a/config/skill_player_weapon/hero01_long_air_attack03.tres b/config/skill_player_weapon/hero01_long_air_attack03.tres index e874400..aecc40e 100644 --- a/config/skill_player_weapon/hero01_long_air_attack03.tres +++ b/config/skill_player_weapon/hero01_long_air_attack03.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://b705py5rht5i3"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://b705py5rht5i3"] [ext_resource type="Resource" uid="uid://bv4uoey1liqoq" path="res://config/attack/sharp_heavy_hit_blow.tres" id="1_5rgpl"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_0x7hh"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_0x7hh"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_2wu8a"] [ext_resource type="Animation" uid="uid://bh5s2t3cbobpp" path="res://resource/skill_animation/hero01_long_air_attack03.tres" id="3_1erk8"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_wrd60"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("2_0x7hh") weapon = ExtResource("5_u3vas") -stance_from = 12 -stance_to = 13 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("3_1erk8") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_5rgpl") attack1_box = ExtResource("2_2wu8a") +stance_from = 12 +stance_to = 13 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_wrd60") animation_name = "long_air_attack03" diff --git a/config/skill_player_weapon/hero01_long_air_skill01.tres b/config/skill_player_weapon/hero01_long_air_skill01.tres index c691c7e..d15e779 100644 --- a/config/skill_player_weapon/hero01_long_air_skill01.tres +++ b/config/skill_player_weapon/hero01_long_air_skill01.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://drg4yoi84to86"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://drg4yoi84to86"] [ext_resource type="Resource" uid="uid://ckbf40c75bfqf" path="res://config/attack/sharp_normal_hit_up.tres" id="1_rnu2n"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_t6vds"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_jgqf0"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_jgqf0"] [ext_resource type="Animation" uid="uid://uxuayi0qf3b7" path="res://resource/skill_animation/hero01_long_air_skill01.tres" id="4_udq7v"] [ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="5_ciknn"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="6_qrnr4"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("3_jgqf0") weapon = ExtResource("6_qrnr4") -stance_from = 11 -stance_to = 12 -break_level = 3 action = "attack_heavy" name = "" skill_animation = ExtResource("4_udq7v") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_rnu2n") attack1_box = ExtResource("2_t6vds") +stance_from = 11 +stance_to = 12 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_ciknn") animation_name = "long_air_skill01" diff --git a/config/skill_player_weapon/hero01_long_air_skill02.tres b/config/skill_player_weapon/hero01_long_air_skill02.tres index 985f9ec..b2bf5cf 100644 --- a/config/skill_player_weapon/hero01_long_air_skill02.tres +++ b/config/skill_player_weapon/hero01_long_air_skill02.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://chuf7yp2oc0f7"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://chuf7yp2oc0f7"] [ext_resource type="Resource" uid="uid://d3mcp8sf6qbmd" path="res://config/attack/sharp_normal_hit.tres" id="1_l1ina"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_whygf"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_to21l"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_to21l"] [ext_resource type="Animation" uid="uid://cjc6sis2xn1yy" path="res://resource/skill_animation/hero01_long_air_skill02.tres" id="4_u7aq7"] [ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="5_6p3pi"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="6_vj7l0"] @@ -10,16 +10,17 @@ [resource] script = ExtResource("3_to21l") weapon = ExtResource("6_vj7l0") -stance_from = 12 -stance_to = 0 -break_level = 3 action = "attack_heavy" name = "" skill_animation = ExtResource("4_u7aq7") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_l1ina") attack1_box = ExtResource("2_whygf") +stance_from = 12 +stance_to = 0 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_6p3pi") animation_name = "long_air_skill02" diff --git a/config/skill_player_weapon/hero01_long_attack01.tres b/config/skill_player_weapon/hero01_long_attack01.tres index 0980a7e..d7a0633 100644 --- a/config/skill_player_weapon/hero01_long_attack01.tres +++ b/config/skill_player_weapon/hero01_long_attack01.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://dkr1k00c2eecc"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://dkr1k00c2eecc"] [ext_resource type="Resource" uid="uid://d3mcp8sf6qbmd" path="res://config/attack/sharp_normal_hit.tres" id="1_6ven2"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_gik08"] +[ext_resource type="Script" path="res://script/config/skill_weapon_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="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_my38a"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_id85o"] @@ -10,15 +10,17 @@ [resource] script = ExtResource("1_gik08") weapon = ExtResource("4_id85o") -stance_from = 0 -stance_to = 1 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("2_6nbpq") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_6ven2") attack1_box = ExtResource("2_my38a") +stance_from = 0 +stance_to = 1 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_xel5p") animation_name = "long_attack01" diff --git a/config/skill_player_weapon/hero01_long_attack02.tres b/config/skill_player_weapon/hero01_long_attack02.tres index 320c0fe..a699702 100644 --- a/config/skill_player_weapon/hero01_long_attack02.tres +++ b/config/skill_player_weapon/hero01_long_attack02.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://kpr8aqmnyv2k"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://kpr8aqmnyv2k"] [ext_resource type="Resource" uid="uid://d3mcp8sf6qbmd" path="res://config/attack/sharp_normal_hit.tres" id="1_8fm1u"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_e0fqi"] +[ext_resource type="Script" path="res://script/config/skill_weapon_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="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_s06n4"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"] @@ -10,15 +10,17 @@ [resource] script = ExtResource("1_e0fqi") weapon = ExtResource("4_novna") -stance_from = 1 -stance_to = 2 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("2_jrgan") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_8fm1u") attack1_box = ExtResource("2_s06n4") +stance_from = 1 +stance_to = 2 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("3_jidy7") animation_name = "long_attack02" diff --git a/config/skill_player_weapon/hero01_long_attack03.tres b/config/skill_player_weapon/hero01_long_attack03.tres index c50e88a..896c776 100644 --- a/config/skill_player_weapon/hero01_long_attack03.tres +++ b/config/skill_player_weapon/hero01_long_attack03.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://5ufjc1dso0y8"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://5ufjc1dso0y8"] [ext_resource type="Resource" uid="uid://btg40rn2f36c2" path="res://config/attack/sharp_normal_hit_back.tres" id="1_7ai5j"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uaib7"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_uaib7"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_8uqiw"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_j0l20"] [ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="2_ugt3f"] @@ -10,17 +10,19 @@ [resource] script = ExtResource("1_uaib7") weapon = ExtResource("2_8uqiw") -stance_from = 2 -stance_to = 3 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("2_ugt3f") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_7ai5j") attack1_box = ExtResource("2_j0l20") attack2 = ExtResource("1_7ai5j") attack2_box = ExtResource("2_j0l20") +stance_from = 2 +stance_to = 3 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("3_sr2og") animation_name = "long_attack03" diff --git a/config/skill_player_weapon/hero01_long_attack04.tres b/config/skill_player_weapon/hero01_long_attack04.tres index 8905282..e93936d 100644 --- a/config/skill_player_weapon/hero01_long_attack04.tres +++ b/config/skill_player_weapon/hero01_long_attack04.tres @@ -1,8 +1,8 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=9 format=3 uid="uid://dvdr5vd1vbe12"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=9 format=3 uid="uid://dvdr5vd1vbe12"] [ext_resource type="Resource" uid="uid://bv4uoey1liqoq" path="res://config/attack/sharp_heavy_hit_blow.tres" id="1_8ipjq"] [ext_resource type="Resource" uid="uid://c87w2x5qfqdns" path="res://config/attack/blunt_normal_hit_back.tres" id="1_44ai1"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_xsxbs"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_xsxbs"] [ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_5jvmg"] [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://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"] @@ -12,18 +12,19 @@ [resource] script = ExtResource("1_xsxbs") weapon = ExtResource("4_plyre") -stance_from = 3 -stance_to = 4 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("2_sam6s") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_44ai1") attack1_box = ExtResource("2_5jvmg") attack2 = ExtResource("1_8ipjq") attack2_box = ExtResource("4_7j0pm") +stance_from = 3 +stance_to = 4 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("3_w7h1m") animation_name = "long_attack04" diff --git a/config/skill_player_weapon/hero01_long_skill01.tres b/config/skill_player_weapon/hero01_long_skill01.tres index 17bb483..57ce363 100644 --- a/config/skill_player_weapon/hero01_long_skill01.tres +++ b/config/skill_player_weapon/hero01_long_skill01.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://cwqbhrv8bd5vn"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://cwqbhrv8bd5vn"] [ext_resource type="Resource" uid="uid://2bkub7vmxjeu" path="res://config/attack/sharp_mid_hit_blow.tres" id="1_blbi2"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_ud5ph"] +[ext_resource type="Script" path="res://script/config/skill_weapon_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="Resource" uid="uid://decgfcx2xsj8i" path="res://config/attack_box/circle_mid.tres" id="2_uxcyk"] [ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"] @@ -10,15 +10,17 @@ [resource] script = ExtResource("1_ud5ph") weapon = ExtResource("4_3bf64") -stance_from = 1 -stance_to = 2 -break_level = 3 action = "attack_heavy" name = "" skill_animation = ExtResource("2_ewts2") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_blbi2") attack1_box = ExtResource("2_uxcyk") +stance_from = 1 +stance_to = 2 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("3_qwjfl") animation_name = "long_skill01" diff --git a/config/skill_player_weapon/hero01_long_skill02.tres b/config/skill_player_weapon/hero01_long_skill02.tres index bea1b76..e29f098 100644 --- a/config/skill_player_weapon/hero01_long_skill02.tres +++ b/config/skill_player_weapon/hero01_long_skill02.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://vvftj1wk88xj"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=7 format=3 uid="uid://vvftj1wk88xj"] [ext_resource type="Resource" uid="uid://bvtpba01td04l" path="res://config/attack/sharp_mid_hit_up.tres" id="1_gap5g"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_1xtt1"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="2_1xtt1"] [ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_tsg38"] [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"] @@ -10,16 +10,17 @@ [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") +range = 0.0 free_lock = false ignore_push = false attack1 = ExtResource("1_gap5g") attack1_box = ExtResource("2_tsg38") +stance_from = 2 +stance_to = 10 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("4_rbnly") animation_name = "long_skill02" diff --git a/config/skill_player_weapon/hero01_short_attack01.tres b/config/skill_player_weapon/hero01_short_attack01.tres index f8c6679..1dbb58a 100644 --- a/config/skill_player_weapon/hero01_short_attack01.tres +++ b/config/skill_player_weapon/hero01_short_attack01.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://ddc14ei2mwen6"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=6 format=3 uid="uid://ddc14ei2mwen6"] [ext_resource type="Resource" uid="uid://dib6g7t6p5ac2" path="res://config/attack/blunt_normal_hit.tres" id="1_4lnv2"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_gsnqk"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_gsnqk"] [ext_resource type="Animation" uid="uid://bkre61dn64j2f" path="res://resource/skill_animation/hero01_short_attack01.tres" id="4_f30l7"] [ext_resource type="SpriteFrames" uid="uid://cndpnxtdh37ii" path="res://resource/animation/character/hero01_short_attack.aseprite" id="5_8vcrr"] [ext_resource type="Resource" uid="uid://pnhii1a83axg" path="res://config/weapon/short.tres" id="6_fxdqr"] @@ -9,14 +9,16 @@ [resource] script = ExtResource("3_gsnqk") weapon = ExtResource("6_fxdqr") -stance_from = 0 -stance_to = 1 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_f30l7") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_4lnv2") +stance_from = 0 +stance_to = 1 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_8vcrr") animation_name = "short_attack01" diff --git a/config/skill_player_weapon/hero01_short_attack02.tres b/config/skill_player_weapon/hero01_short_attack02.tres index d0b1952..59bee85 100644 --- a/config/skill_player_weapon/hero01_short_attack02.tres +++ b/config/skill_player_weapon/hero01_short_attack02.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://d2pyl8sqnljtw"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=6 format=3 uid="uid://d2pyl8sqnljtw"] [ext_resource type="Resource" uid="uid://dib6g7t6p5ac2" path="res://config/attack/blunt_normal_hit.tres" id="1_hnewa"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_8ixmd"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_8ixmd"] [ext_resource type="Animation" uid="uid://xfuwfwtw4cna" path="res://resource/skill_animation/hero01_short_attack02.tres" id="4_mepfm"] [ext_resource type="SpriteFrames" uid="uid://cndpnxtdh37ii" path="res://resource/animation/character/hero01_short_attack.aseprite" id="5_dxfya"] [ext_resource type="Resource" uid="uid://pnhii1a83axg" path="res://config/weapon/short.tres" id="6_e44nf"] @@ -9,14 +9,16 @@ [resource] script = ExtResource("3_8ixmd") weapon = ExtResource("6_e44nf") -stance_from = 1 -stance_to = 2 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_mepfm") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_hnewa") +stance_from = 1 +stance_to = 2 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_dxfya") animation_name = "short_attack02" diff --git a/config/skill_player_weapon/hero01_short_attack03.tres b/config/skill_player_weapon/hero01_short_attack03.tres index 1ed300b..1df65e5 100644 --- a/config/skill_player_weapon/hero01_short_attack03.tres +++ b/config/skill_player_weapon/hero01_short_attack03.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://dxj5ekoi7cd7m"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=6 format=3 uid="uid://dxj5ekoi7cd7m"] [ext_resource type="Resource" uid="uid://c87w2x5qfqdns" path="res://config/attack/blunt_normal_hit_back.tres" id="1_afi2j"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_8rsme"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_8rsme"] [ext_resource type="Animation" uid="uid://bdyjvq185tdk6" path="res://resource/skill_animation/hero01_short_attack03.tres" id="4_7ws6s"] [ext_resource type="SpriteFrames" uid="uid://cndpnxtdh37ii" path="res://resource/animation/character/hero01_short_attack.aseprite" id="5_40215"] [ext_resource type="Resource" uid="uid://pnhii1a83axg" path="res://config/weapon/short.tres" id="6_pclwt"] @@ -9,15 +9,17 @@ [resource] script = ExtResource("3_8rsme") weapon = ExtResource("6_pclwt") -stance_from = 2 -stance_to = 3 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_7ws6s") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_afi2j") attack2 = ExtResource("1_afi2j") +stance_from = 2 +stance_to = 3 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_40215") animation_name = "short_attack03" diff --git a/config/skill_player_weapon/hero01_short_attack04.tres b/config/skill_player_weapon/hero01_short_attack04.tres index 73f179a..b93d2fe 100644 --- a/config/skill_player_weapon/hero01_short_attack04.tres +++ b/config/skill_player_weapon/hero01_short_attack04.tres @@ -1,7 +1,7 @@ -[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://bh0tfn8mi3u3r"] +[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=6 format=3 uid="uid://bh0tfn8mi3u3r"] [ext_resource type="Resource" uid="uid://bv4uoey1liqoq" path="res://config/attack/sharp_heavy_hit_blow.tres" id="1_d23lh"] -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="3_44lu2"] +[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="3_44lu2"] [ext_resource type="Animation" uid="uid://c8qll8wcn633m" path="res://resource/skill_animation/hero01_short_attack04.tres" id="4_rcj2c"] [ext_resource type="SpriteFrames" uid="uid://cndpnxtdh37ii" path="res://resource/animation/character/hero01_short_attack.aseprite" id="5_owk7o"] [ext_resource type="Resource" uid="uid://pnhii1a83axg" path="res://config/weapon/short.tres" id="6_ht3kv"] @@ -9,14 +9,16 @@ [resource] script = ExtResource("3_44lu2") weapon = ExtResource("6_ht3kv") -stance_from = 3 -stance_to = 4 -break_level = 3 action = "attack_light" name = "" skill_animation = ExtResource("4_rcj2c") +range = 0.0 free_lock = false +ignore_push = false attack1 = ExtResource("1_d23lh") +stance_from = 3 +stance_to = 4 +break_level = 3 refresh_animation = false sprite_frames = ExtResource("5_owk7o") animation_name = "short_attack04" diff --git a/resource/skill_animation/hero01_basic_air_flash.tres b/resource/skill_animation/hero01_basic_air_flash.tres index e52641c..45ac0aa 100644 --- a/resource/skill_animation/hero01_basic_air_flash.tres +++ b/resource/skill_animation/hero01_basic_air_flash.tres @@ -5,6 +5,7 @@ [resource] resource_name = "hero01_basic_air_flash" length = 0.8 +step = 0.1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -32,58 +33,46 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("View:frame") +tracks/2/path = NodePath("Status:break_level") 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), +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7] +"values": [0, 3, 4] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true -tracks/3/path = NodePath("Status:break_level") +tracks/3/path = NodePath("Status:speed_up_rate") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [0, 3, 4] +"values": [0.0, 0.0] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true -tracks/4/path = NodePath("Status:speed_up_rate") +tracks/4/path = NodePath("Status:skill_move_speed") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { -"times": PackedFloat32Array(0, 0.3), +"times": PackedFloat32Array(0.1, 0.3), "transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [0.0, 0.0] +"values": [8.0, 0.0] } -tracks/5/type = "value" +tracks/5/type = "method" tracks/5/imported = false tracks/5/enabled = true -tracks/5/path = NodePath("Status:skill_move_speed") +tracks/5/path = NodePath("Effect") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { -"times": PackedFloat32Array(0.1, 0.3), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [8.0, 0.0] -} -tracks/6/type = "method" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Effect") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/keys = { "times": PackedFloat32Array(0, 0.1, 0.2, 0.3), "transitions": PackedFloat32Array(1, 1, 1, 1), "values": [{ @@ -100,43 +89,55 @@ tracks/6/keys = { "method": &"cast_after_image" }] } +tracks/6/type = "method" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Effect") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.1), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"cast_attack_particle1" +}] +} tracks/7/type = "method" tracks/7/imported = false tracks/7/enabled = true -tracks/7/path = NodePath("Effect") +tracks/7/path = NodePath("Battle") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0.1), +"times": PackedFloat32Array(0.3), "transitions": PackedFloat32Array(1), "values": [{ "args": [], -"method": &"cast_attack_particle1" +"method": &"stop" }] } -tracks/8/type = "method" +tracks/8/type = "value" tracks/8/imported = false tracks/8/enabled = true -tracks/8/path = NodePath("Battle") +tracks/8/path = NodePath("Status:is_speed_y_freeze") tracks/8/interp = 1 tracks/8/loop_wrap = true tracks/8/keys = { -"times": PackedFloat32Array(0.3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"stop" -}] +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] } tracks/9/type = "value" tracks/9/imported = false tracks/9/enabled = true -tracks/9/path = NodePath("Status:is_speed_y_freeze") +tracks/9/path = NodePath("View:frame") tracks/9/interp = 1 tracks/9/loop_wrap = true tracks/9/keys = { -"times": PackedFloat32Array(0, 0.3), -"transitions": PackedFloat32Array(1, 1), +"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": 1, -"values": [true, false] +"values": [0, 1, 2, 3, 4, 5, 6, 7] } diff --git a/resource/skill_animation/hero01_basic_flash.tres b/resource/skill_animation/hero01_basic_flash.tres index 2b2219a..39d42da 100644 --- a/resource/skill_animation/hero01_basic_flash.tres +++ b/resource/skill_animation/hero01_basic_flash.tres @@ -5,6 +5,7 @@ [resource] resource_name = "hero01_basic_flash" length = 0.8 +step = 0.1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -32,58 +33,46 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("View:frame") +tracks/2/path = NodePath("Status:break_level") 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), +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7] +"values": [0, 3, 4] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true -tracks/3/path = NodePath("Status:break_level") +tracks/3/path = NodePath("Status:speed_up_rate") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [0, 3, 4] +"values": [0.0, 0.0] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true -tracks/4/path = NodePath("Status:speed_up_rate") +tracks/4/path = NodePath("Status:skill_move_speed") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { -"times": PackedFloat32Array(0, 0.3), +"times": PackedFloat32Array(0.1, 0.3), "transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [0.0, 0.0] +"values": [8.0, 0.0] } -tracks/5/type = "value" +tracks/5/type = "method" tracks/5/imported = false tracks/5/enabled = true -tracks/5/path = NodePath("Status:skill_move_speed") +tracks/5/path = NodePath("Effect") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { -"times": PackedFloat32Array(0.1, 0.3), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [8.0, 0.0] -} -tracks/6/type = "method" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Effect") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/keys = { "times": PackedFloat32Array(0, 0.1, 0.2, 0.3), "transitions": PackedFloat32Array(1, 1, 1, 1), "values": [{ @@ -100,43 +89,55 @@ tracks/6/keys = { "method": &"cast_after_image" }] } +tracks/6/type = "method" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Effect") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.1), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"cast_attack_particle1" +}] +} tracks/7/type = "method" tracks/7/imported = false tracks/7/enabled = true -tracks/7/path = NodePath("Effect") +tracks/7/path = NodePath("Battle") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0.1), +"times": PackedFloat32Array(0.3), "transitions": PackedFloat32Array(1), "values": [{ "args": [], -"method": &"cast_attack_particle1" +"method": &"stop" }] } -tracks/8/type = "method" +tracks/8/type = "value" tracks/8/imported = false tracks/8/enabled = true -tracks/8/path = NodePath("Battle") +tracks/8/path = NodePath("Status:is_speed_y_freeze") tracks/8/interp = 1 tracks/8/loop_wrap = true tracks/8/keys = { -"times": PackedFloat32Array(0.3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"stop" -}] +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] } tracks/9/type = "value" tracks/9/imported = false tracks/9/enabled = true -tracks/9/path = NodePath("Status:is_speed_y_freeze") +tracks/9/path = NodePath("View:frame") tracks/9/interp = 1 tracks/9/loop_wrap = true tracks/9/keys = { -"times": PackedFloat32Array(0, 0.3), -"transitions": PackedFloat32Array(1, 1), +"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": 1, -"values": [true, false] +"values": [0, 1, 2, 3, 4, 5, 6, 7] } diff --git a/resource/skill_animation/hero01_combo0101.tres b/resource/skill_animation/hero01_combo0101.tres new file mode 100644 index 0000000..2484c55 --- /dev/null +++ b/resource/skill_animation/hero01_combo0101.tres @@ -0,0 +1,42 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://kfvqej1q5iqa"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_0mg3w"] + +[resource] +resource_name = "hero01_combo0101" +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": 1, +"values": [ExtResource("1_0mg3w")] +} +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": 1, +"values": ["long_attack01"] +} +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, 0.8, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} diff --git a/resource/skill_animation/hero01_combo0102.tres b/resource/skill_animation/hero01_combo0102.tres new file mode 100644 index 0000000..cf84332 --- /dev/null +++ b/resource/skill_animation/hero01_combo0102.tres @@ -0,0 +1,42 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://cvxifa2uac5oc"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_jsg5q"] + +[resource] +resource_name = "hero01_combo0102" +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": 1, +"values": [ExtResource("1_jsg5q")] +} +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": 1, +"values": ["long_attack02"] +} +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, 0.8, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} diff --git a/resource/skill_animation/hero01_combo0103.tres b/resource/skill_animation/hero01_combo0103.tres new file mode 100644 index 0000000..4a53401 --- /dev/null +++ b/resource/skill_animation/hero01_combo0103.tres @@ -0,0 +1,43 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://cqc30d5uqi2my"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_bk1sq"] + +[resource] +resource_name = "hero01_combo0103" +length = 1.4 +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": 1, +"values": [ExtResource("1_bk1sq")] +} +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": 1, +"values": ["long_attack03"] +} +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, 0.8, 0.9, 1, 1.1, 1.2, 1.3), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] +} diff --git a/resource/skill_animation/hero01_common_skill03.tres b/resource/skill_animation/hero01_common_skill03.tres new file mode 100644 index 0000000..896c427 --- /dev/null +++ b/resource/skill_animation/hero01_common_skill03.tres @@ -0,0 +1,92 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://d1f7iluo8ejne"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_0llso"] + +[resource] +resource_name = "hero01_common_skill03" +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": 1, +"values": [ExtResource("1_0llso")] +} +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": 1, +"values": ["long_attack01"] +} +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, 0.8, 0.9), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} +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.4, 0.6), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [0, 3, 4] +} +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.2, 0.3), +"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.3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [2.0, 0.0] +} +tracks/6/type = "method" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Effect") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.1), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"cast_attack_particle1" +}] +} diff --git a/resource/skill_animation/hero01_fist_air_skill01.tres b/resource/skill_animation/hero01_fist_air_skill01.tres index 3ebdab7..0e27fef 100644 --- a/resource/skill_animation/hero01_fist_air_skill01.tres +++ b/resource/skill_animation/hero01_fist_air_skill01.tres @@ -33,58 +33,46 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("View:frame") +tracks/2/path = NodePath("Status:break_level") 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, 0.8), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.4, 0.5, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] +"values": [0, 0, 3, 4] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true -tracks/3/path = NodePath("Status:break_level") +tracks/3/path = NodePath("Status:speed_up_rate") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { -"times": PackedFloat32Array(0, 0.4, 0.5, 0.8), -"transitions": PackedFloat32Array(1, 1, 1, 1), +"times": PackedFloat32Array(0.2, 0.7), +"transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [0, 0, 3, 4] +"values": [-0.5, -1.0] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true -tracks/4/path = NodePath("Status:speed_up_rate") +tracks/4/path = NodePath("Status:skill_move_speed") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { -"times": PackedFloat32Array(0.2, 0.7), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0, 0.2, 0.4), +"transitions": PackedFloat32Array(1, 1, 1), "update": 1, -"values": [-0.5, -1.0] +"values": [0.0, 7.0, 0.0] } -tracks/5/type = "value" +tracks/5/type = "method" tracks/5/imported = false tracks/5/enabled = true -tracks/5/path = NodePath("Status:skill_move_speed") +tracks/5/path = NodePath("Battle") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { -"times": PackedFloat32Array(0, 0.2, 0.4), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 1, -"values": [0.0, 7.0, 0.0] -} -tracks/6/type = "method" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Battle") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/keys = { "times": PackedFloat32Array(0.3, 0.4), "transitions": PackedFloat32Array(1, 1), "values": [{ @@ -95,33 +83,47 @@ tracks/6/keys = { "method": &"attack2" }] } -tracks/7/type = "value" +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, 0.2, 0.2001, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [0.1, -4.0, -7.0, 0.0] +} +tracks/7/type = "method" tracks/7/imported = false tracks/7/enabled = true -tracks/7/path = NodePath("Status:skill_float_speed") +tracks/7/path = NodePath("Effect") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0, 0.2, 0.2001, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 1, -"values": [0.1, -4.0, -7.0, 0.0] +"times": PackedFloat32Array(0.1, 0.4), +"transitions": PackedFloat32Array(1, 1), +"values": [{ +"args": [], +"method": &"cast_attack_particle1" +}, { +"args": [], +"method": &"cast_attack_particle2_release" +}] } tracks/8/type = "method" tracks/8/imported = false tracks/8/enabled = true -tracks/8/path = NodePath("Effect") +tracks/8/path = NodePath("Battle") tracks/8/interp = 1 tracks/8/loop_wrap = true tracks/8/keys = { -"times": PackedFloat32Array(0.1, 0.4), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0.3), +"transitions": PackedFloat32Array(1), "values": [{ "args": [], -"method": &"cast_attack_particle1" -}, { -"args": [], -"method": &"cast_attack_particle2_release" +"method": &"check_ground" }] } tracks/9/type = "method" @@ -131,24 +133,22 @@ tracks/9/path = NodePath("Battle") tracks/9/interp = 1 tracks/9/loop_wrap = true tracks/9/keys = { -"times": PackedFloat32Array(0.3), +"times": PackedFloat32Array(0.4), "transitions": PackedFloat32Array(1), "values": [{ "args": [], -"method": &"check_ground" +"method": &"stop" }] } -tracks/10/type = "method" +tracks/10/type = "value" tracks/10/imported = false tracks/10/enabled = true -tracks/10/path = NodePath("Battle") +tracks/10/path = NodePath("View:frame") tracks/10/interp = 1 tracks/10/loop_wrap = true tracks/10/keys = { -"times": PackedFloat32Array(0.4), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"stop" -}] +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] } diff --git a/resource/skill_animation/hero01_long_air_attack02.tres b/resource/skill_animation/hero01_long_air_attack02.tres index cf80e74..477ec6a 100644 --- a/resource/skill_animation/hero01_long_air_attack02.tres +++ b/resource/skill_animation/hero01_long_air_attack02.tres @@ -92,25 +92,13 @@ tracks/6/keys = { "method": &"attack1" }] } -tracks/7/type = "value" +tracks/7/type = "method" tracks/7/imported = false tracks/7/enabled = true -tracks/7/path = NodePath("View:frame") +tracks/7/path = NodePath("Effect") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] -} -tracks/8/type = "method" -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/path = NodePath("Effect") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/keys = { "times": PackedFloat32Array(0.1), "transitions": PackedFloat32Array(1), "values": [{ @@ -118,3 +106,15 @@ tracks/8/keys = { "method": &"cast_attack_particle1" }] } +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("View:frame") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] +} diff --git a/resource/skill_animation/hero01_long_air_attack03.tres b/resource/skill_animation/hero01_long_air_attack03.tres index d6c999d..439ad6a 100644 --- a/resource/skill_animation/hero01_long_air_attack03.tres +++ b/resource/skill_animation/hero01_long_air_attack03.tres @@ -91,25 +91,13 @@ tracks/6/keys = { "method": &"attack1" }] } -tracks/7/type = "value" +tracks/7/type = "method" tracks/7/imported = false tracks/7/enabled = true -tracks/7/path = NodePath("View:frame") +tracks/7/path = NodePath("Effect") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] -} -tracks/8/type = "method" -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/path = NodePath("Effect") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/keys = { "times": PackedFloat32Array(0.1), "transitions": PackedFloat32Array(1), "values": [{ @@ -117,3 +105,15 @@ tracks/8/keys = { "method": &"cast_attack_particle1" }] } +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("View:frame") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] +} diff --git a/resource/skill_animation/hero01_remote01.tres b/resource/skill_animation/hero01_remote01.tres new file mode 100644 index 0000000..6b24d18 --- /dev/null +++ b/resource/skill_animation/hero01_remote01.tres @@ -0,0 +1,93 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://h8hm3kbecdx8"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_ikxh1"] + +[resource] +resource_name = "hero01_remote01" +step = 0.1 +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": 1, +"values": [ExtResource("1_ikxh1")] +} +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": 1, +"values": ["long_attack01"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +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.7), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [0, 3, 4] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Status:speed_up_rate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0.2, 0.3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [-0.5, -1.0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +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.3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [2.0, 0.0] +} +tracks/5/type = "method" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Battle") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0.3), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"cast_sub_character" +}] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("View:frame") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/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, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} diff --git a/resource/skill_animation/hero01_slash01.tres b/resource/skill_animation/hero01_slash01.tres new file mode 100644 index 0000000..3cde6b1 --- /dev/null +++ b/resource/skill_animation/hero01_slash01.tres @@ -0,0 +1,43 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://q7qlw0a7hfjt"] + +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_kcx6f"] + +[resource] +resource_name = "hero01_slash01" +length = 1.2 +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": 1, +"values": [ExtResource("1_kcx6f")] +} +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": 1, +"values": ["long_attack04"] +} +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, 0.8, 0.9, 1, 1.1), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] +} diff --git a/resource/skill_animation_library/animation_library.tres b/resource/skill_animation_library/animation_library.tres index 5a7527e..75a9975 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=34 format=3 uid="uid://croik07a1qko5"] +[gd_resource type="AnimationLibrary" load_steps=40 format=3 uid="uid://croik07a1qko5"] [ext_resource type="Animation" uid="uid://t01a4jvp8srr" path="res://resource/skill_animation/hero01_fist_attack01.tres" id="1_4bwwm"] [ext_resource type="Animation" uid="uid://cfapnjkj5dkws" path="res://resource/skill_animation/hero01_basic_flash.tres" id="1_46f01"] @@ -12,15 +12,19 @@ [ext_resource type="Animation" uid="uid://bh5s2t3cbobpp" path="res://resource/skill_animation/hero01_long_air_attack03.tres" id="2_nqaew"] [ext_resource type="Animation" uid="uid://cyu0yin1rpiak" path="res://resource/skill_animation/hero01_fist_attack02.tres" id="2_vx7p1"] [ext_resource type="Animation" uid="uid://b2xdmgnem1h4g" path="res://resource/skill_animation/hero01_fist_attack05.tres" id="2_y7w3h"] +[ext_resource type="Animation" uid="uid://kfvqej1q5iqa" path="res://resource/skill_animation/hero01_combo0101.tres" id="3_dkedy"] [ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="3_g8q4d"] [ext_resource type="Animation" uid="uid://cm4c0rwh0mqn4" path="res://resource/skill_animation/hero01_common_skill0103.tres" id="3_ily05"] [ext_resource type="Animation" uid="uid://c6mk8tfdpniys" path="res://resource/skill_animation/hero01_fist_attack03.tres" id="3_lo6yb"] [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://6u3dhxly760l" path="res://resource/skill_animation/hero01_fist_attack04.tres" id="4_087em"] +[ext_resource type="Animation" uid="uid://cvxifa2uac5oc" path="res://resource/skill_animation/hero01_combo0102.tres" id="4_dc8mt"] [ext_resource type="Animation" uid="uid://dkkqys8el1u6g" path="res://resource/skill_animation/hero01_common_skill02.tres" id="4_vtwy2"] [ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="5_df32u"] [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://cqc30d5uqi2my" path="res://resource/skill_animation/hero01_combo0103.tres" id="5_o144c"] +[ext_resource type="Animation" uid="uid://d1f7iluo8ejne" path="res://resource/skill_animation/hero01_common_skill03.tres" id="7_05hi3"] [ext_resource type="Animation" uid="uid://iprcbf277rf4" path="res://resource/skill_animation/hero01_long_skill02.tres" id="7_ui68j"] [ext_resource type="Animation" uid="uid://chj3rlh6krt66" path="res://resource/skill_animation/hero01_fist_air_attack01.tres" id="8_svst8"] [ext_resource type="Animation" uid="uid://dia1xwl6foafg" path="res://resource/skill_animation/hero01_fist_air_attack02.tres" id="9_0fycy"] @@ -33,15 +37,21 @@ [ext_resource type="Animation" uid="uid://j1o3tdfew2qw" path="res://resource/skill_animation/hero01_flash.tres" id="16_ctotk"] [ext_resource type="Animation" uid="uid://uxuayi0qf3b7" path="res://resource/skill_animation/hero01_long_air_skill01.tres" id="20_0ey8y"] [ext_resource type="Animation" uid="uid://cjc6sis2xn1yy" path="res://resource/skill_animation/hero01_long_air_skill02.tres" id="21_ks43l"] +[ext_resource type="Animation" uid="uid://h8hm3kbecdx8" path="res://resource/skill_animation/hero01_remote01.tres" id="33_7i37k"] +[ext_resource type="Animation" uid="uid://q7qlw0a7hfjt" path="res://resource/skill_animation/hero01_slash01.tres" id="38_lyels"] [resource] _data = { "hero01_basic_air_flash": ExtResource("1_np5aa"), "hero01_basic_flash": ExtResource("1_46f01"), +"hero01_combo0101": ExtResource("3_dkedy"), +"hero01_combo0102": ExtResource("4_dc8mt"), +"hero01_combo0103": ExtResource("5_o144c"), "hero01_common_skill0101": ExtResource("1_vt4qf"), "hero01_common_skill0102": ExtResource("2_8l02x"), "hero01_common_skill0103": ExtResource("3_ily05"), "hero01_common_skill02": ExtResource("4_vtwy2"), +"hero01_common_skill03": ExtResource("7_05hi3"), "hero01_fist_air_attack01": ExtResource("8_svst8"), "hero01_fist_air_attack02": ExtResource("9_0fycy"), "hero01_fist_air_attack03": ExtResource("10_te03d"), @@ -64,9 +74,11 @@ _data = { "hero01_long_flash": ExtResource("5_fumom"), "hero01_long_skill01": ExtResource("5_kt0qw"), "hero01_long_skill02": ExtResource("7_ui68j"), +"hero01_remote01": ExtResource("33_7i37k"), "hero01_short_attack01": ExtResource("11_n0dhn"), "hero01_short_attack02": ExtResource("11_h2vlt"), "hero01_short_attack03": ExtResource("11_kejyu"), "hero01_short_attack04": ExtResource("11_bxi8a"), +"hero01_slash01": ExtResource("38_lyels"), "monster01_attack01": ExtResource("11_q5gn4") } diff --git a/scene/ai/bullet01.tscn b/scene/ai/bullet01.tscn new file mode 100644 index 0000000..9340f6d --- /dev/null +++ b/scene/ai/bullet01.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=6 format=3 uid="uid://bng8h2cdq0j5m"] + +[ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="1_r673b"] +[ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="3_yeaa5"] +[ext_resource type="Script" path="res://script/ai/action/action_destroy.gd" id="5_0a0n1"] +[ext_resource type="Script" path="res://script/ai/action/action_wait.gd" id="6_omj7f"] +[ext_resource type="Script" path="res://script/ai/action/action_attack1.gd" id="7_wcjhl"] + +[node name="BeehaveTree" type="Node" node_paths=PackedStringArray("blackboard")] +script = ExtResource("1_r673b") +blackboard = NodePath("@Node@80344") + +[node name="SequenceComposite" type="Node" parent="."] +script = ExtResource("3_yeaa5") + +[node name="ActionWait2" type="Node" parent="SequenceComposite"] +script = ExtResource("6_omj7f") +wait_time = 0.1 + +[node name="ActionAttack1" type="Node" parent="SequenceComposite"] +script = ExtResource("7_wcjhl") + +[node name="ActionWait" type="Node" parent="SequenceComposite"] +script = ExtResource("6_omj7f") +wait_time = 0.1 + +[node name="ActionDestroy" type="Node" parent="SequenceComposite"] +script = ExtResource("5_0a0n1") diff --git a/scene/ai/bullet02.tscn b/scene/ai/bullet02.tscn new file mode 100644 index 0000000..1a5dae6 --- /dev/null +++ b/scene/ai/bullet02.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=6 format=3 uid="uid://c81t2x7d7tb3p"] + +[ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="1_go1b5"] +[ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="2_k8nph"] +[ext_resource type="Script" path="res://script/ai/action/action_wait.gd" id="3_xg7xh"] +[ext_resource type="Script" path="res://script/ai/action/action_attack1.gd" id="4_mhoc5"] +[ext_resource type="Script" path="res://script/ai/action/action_destroy.gd" id="5_ejojh"] + +[node name="BeehaveTree" type="Node" node_paths=PackedStringArray("blackboard")] +script = ExtResource("1_go1b5") +blackboard = NodePath("@Node@80344") + +[node name="SequenceComposite" type="Node" parent="."] +script = ExtResource("2_k8nph") + +[node name="ActionWait2" type="Node" parent="SequenceComposite"] +script = ExtResource("3_xg7xh") +wait_time = 0.1 + +[node name="ActionAttack1" type="Node" parent="SequenceComposite"] +script = ExtResource("4_mhoc5") + +[node name="ActionWait" type="Node" parent="SequenceComposite"] +script = ExtResource("3_xg7xh") +wait_time = 0.1 + +[node name="ActionDestroy" type="Node" parent="SequenceComposite"] +script = ExtResource("5_ejojh") diff --git a/scene/ai/monster01.tscn b/scene/ai/monster01.tscn new file mode 100644 index 0000000..70e4e25 --- /dev/null +++ b/scene/ai/monster01.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=5 format=3 uid="uid://1bjfixh8yjc1"] + +[ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="1_bbyao"] +[ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="2_04nig"] +[ext_resource type="Script" path="res://script/ai/action/action_find_target.gd" id="3_c43ds"] +[ext_resource type="Script" path="res://script/ai/action_with_target/action_move_to_target.gd" id="4_xtt4k"] + +[node name="BeehaveTree" type="Node" node_paths=PackedStringArray("blackboard")] +script = ExtResource("1_bbyao") +blackboard = NodePath("@Node@79226") + +[node name="SequenceComposite" type="Node" parent="."] +script = ExtResource("2_04nig") + +[node name="ActionFindTarget" type="Node" parent="SequenceComposite"] +script = ExtResource("3_c43ds") + +[node name="ActionMoveToTarget" type="Node" parent="SequenceComposite"] +script = ExtResource("4_xtt4k") diff --git a/scene/ai/monster02.tscn b/scene/ai/monster02.tscn new file mode 100644 index 0000000..c8de471 --- /dev/null +++ b/scene/ai/monster02.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=5 format=3 uid="uid://2e2ws176hev1"] + +[ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="1_y3xa0"] +[ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="2_ohjmj"] +[ext_resource type="Script" path="res://script/ai/action/action_find_target.gd" id="3_fmht1"] +[ext_resource type="Script" path="res://script/ai/action_with_target/action_move_to_target.gd" id="4_pwax0"] + +[node name="BeehaveTree" type="Node" node_paths=PackedStringArray("blackboard")] +script = ExtResource("1_y3xa0") +blackboard = NodePath("@Node@79226") + +[node name="SequenceComposite" type="Node" parent="."] +script = ExtResource("2_ohjmj") + +[node name="ActionFindTarget" type="Node" parent="SequenceComposite"] +script = ExtResource("3_fmht1") + +[node name="ActionMoveToTarget" type="Node" parent="SequenceComposite"] +script = ExtResource("4_pwax0") diff --git a/scene/character/bullet.tscn b/scene/character/bullet.tscn index 171206d..0a14f2c 100644 --- a/scene/character/bullet.tscn +++ b/scene/character/bullet.tscn @@ -6,10 +6,10 @@ [node name="Character" instance=ExtResource("1_f620f")] -[node name="View" parent="." index="2"] +[node name="View" parent="." index="3"] cast_shadow = 0 sprite_frames = ExtResource("2_sjv5x") animation = &"fist_attack01" -[node name="BulletAI" type="Node3D" parent="." index="8"] +[node name="BulletAI" type="Node3D" parent="." index="10"] script = ExtResource("3_c6unk") diff --git a/scene/character/character.tscn b/scene/character/character.tscn index d888730..c4855a5 100644 --- a/scene/character/character.tscn +++ b/scene/character/character.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://8rcvw1vnjcf7"] +[gd_scene load_steps=22 format=3 uid="uid://8rcvw1vnjcf7"] [ext_resource type="Script" path="res://script/character/character.gd" id="1_tonbs"] [ext_resource type="Script" path="res://script/character/hitbox.gd" id="2_6xf87"] @@ -7,12 +7,13 @@ [ext_resource type="Script" path="res://script/character/move.gd" id="4_66r53"] [ext_resource type="Texture2D" uid="uid://daqn6aqfp1hva" path="res://resource/animation/character/hero01_long_attack.png" id="4_fcd8a"] [ext_resource type="Script" path="res://script/character/view.gd" id="4_vijjv"] -[ext_resource type="SpriteFrames" uid="uid://jpxh0jr8wp8g" path="res://resource/animation/character/hero01_basic.aseprite" id="6_c3rai"] [ext_resource type="Script" path="res://script/character/skill.gd" id="6_h4xqy"] [ext_resource type="AnimationLibrary" uid="uid://croik07a1qko5" path="res://resource/skill_animation_library/animation_library.tres" id="6_pakq5"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="6_vb8qm"] [ext_resource type="Script" path="res://script/character/battle.gd" id="8_w84sf"] [ext_resource type="Script" path="res://script/character/buff.gd" id="9_jlnhy"] [ext_resource type="Script" path="res://script/character/effect.gd" id="12_eyfcd"] +[ext_resource type="Script" path="res://script/character/core.gd" id="14_gua01"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_mmrro"] height = 1.0 @@ -104,8 +105,8 @@ pixel_size = 0.02 double_sided = false alpha_cut = 2 texture_filter = 0 -sprite_frames = ExtResource("6_c3rai") -animation = &"basic_air_flash" +sprite_frames = ExtResource("6_vb8qm") +animation = &"long_attack01" script = ExtResource("4_vijjv") [node name="Move" type="Node3D" parent="."] @@ -133,6 +134,10 @@ hit_back_limit_curve = SubResource("Curve_e7j3f") unique_name_in_owner = true script = ExtResource("12_eyfcd") +[node name="Core" type="Node3D" parent="."] +unique_name_in_owner = true +script = ExtResource("14_gua01") + [connection signal="area_entered" from="Pushbox" to="Pushbox" method="on_area_entered"] [connection signal="area_exited" from="Pushbox" to="Pushbox" method="on_area_exited"] [connection signal="animation_finished" from="View" to="View" method="_on_animation_finished"] diff --git a/scene/character/monster.tscn b/scene/character/monster.tscn index d70de77..5f0afc0 100644 --- a/scene/character/monster.tscn +++ b/scene/character/monster.tscn @@ -1,25 +1,9 @@ -[gd_scene load_steps=7 format=3 uid="uid://c37rf5ecfrvwn"] +[gd_scene load_steps=3 format=3 uid="uid://c37rf5ecfrvwn"] [ext_resource type="PackedScene" uid="uid://8rcvw1vnjcf7" path="res://scene/character/character.tscn" id="1_eshlr"] [ext_resource type="Script" path="res://script/character/ai/ai.gd" id="2_7ei2q"] -[ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="3_x3u4t"] -[ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="4_k2hsy"] -[ext_resource type="Script" path="res://script/ai/action/action_find_target.gd" id="5_m7lck"] -[ext_resource type="Script" path="res://script/ai/action_with_target/action_move_to_target.gd" id="6_ladgl"] [node name="Character" instance=ExtResource("1_eshlr")] -[node name="MonsterAI" type="Node3D" parent="." index="9"] +[node name="MonsterAI" type="Node3D" parent="." index="10"] script = ExtResource("2_7ei2q") - -[node name="BeehaveTree" type="Node" parent="MonsterAI" index="0"] -script = ExtResource("3_x3u4t") - -[node name="SequenceComposite" type="Node" parent="MonsterAI/BeehaveTree" index="0"] -script = ExtResource("4_k2hsy") - -[node name="ActionFindTarget" type="Node" parent="MonsterAI/BeehaveTree/SequenceComposite" index="0"] -script = ExtResource("5_m7lck") - -[node name="ActionMoveToTarget" type="Node" parent="MonsterAI/BeehaveTree/SequenceComposite" index="1"] -script = ExtResource("6_ladgl") diff --git a/scene/character/player.tscn b/scene/character/player.tscn index dd9f083..d4f0253 100644 --- a/scene/character/player.tscn +++ b/scene/character/player.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://ba2trga1rrba8"] +[gd_scene load_steps=7 format=3 uid="uid://ba2trga1rrba8"] [ext_resource type="PackedScene" uid="uid://8rcvw1vnjcf7" 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="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="2_jecaa"] [ext_resource type="Script" path="res://script/character/player/player_input.gd" id="3_n07go"] -[ext_resource type="Script" path="res://script/character/player/core.gd" id="3_rxdse"] [ext_resource type="Script" path="res://script/character/player/player_info.gd" id="4_mi1lk"] [ext_resource type="Script" path="res://script/character/player/player_action.gd" id="5_gum7v"] @@ -15,14 +14,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.693056, 0) sprite_frames = ExtResource("2_jecaa") animation = &"fist_air_skill01" -[node name="Combo" type="Node3D" parent="." index="9"] +[node name="Combo" type="Node3D" parent="." index="10"] unique_name_in_owner = true script = ExtResource("2_i44w8") -[node name="Core" type="Node3D" parent="." index="10"] -unique_name_in_owner = true -script = ExtResource("3_rxdse") - [node name="PlayerInput" type="Node3D" parent="." index="11"] unique_name_in_owner = true script = ExtResource("3_n07go") diff --git a/scene/effect/particle/bullet01.tscn b/scene/effect/particle/bullet01.tscn new file mode 100644 index 0000000..d701105 --- /dev/null +++ b/scene/effect/particle/bullet01.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=3 uid="uid://c14x2tyyt8hf6"] + +[ext_resource type="PackedScene" uid="uid://b2h4pcmlii7dg" path="res://scene/effect/particle/_particle_slash1.tscn" id="1_urvri"] + +[node name="Particle" instance=ExtResource("1_urvri")] +transform = Transform3D(0.5, 0, 0, 0, 1, 0, 0, 0, 0.5, 0, 0, 0) + +[node name="Slash" parent="." index="0"] +emitting = true +lifetime = 600.0 +one_shot = false diff --git a/scene/effect/particle/hero01_common_skill03.tscn b/scene/effect/particle/hero01_common_skill03.tscn new file mode 100644 index 0000000..76b0747 --- /dev/null +++ b/scene/effect/particle/hero01_common_skill03.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://dd6hhtcxrx8ox"] + +[ext_resource type="PackedScene" uid="uid://b2h4pcmlii7dg" path="res://scene/effect/particle/_particle_slash1.tscn" id="1_p8l11"] + +[node name="Particle" instance=ExtResource("1_p8l11")] +transform = Transform3D(1, 0, 0, 0, -0.707107, 0.353553, 0, -0.707107, -0.353553, 0, 0, 0) diff --git a/scene/launcher.tscn b/scene/launcher.tscn index 0cd818e..f342689 100644 --- a/scene/launcher.tscn +++ b/scene/launcher.tscn @@ -95,7 +95,6 @@ process_mode = 3 script = ExtResource("12_vfqm4") [node name="EditorTool" type="Node3D" parent="."] -visible = false script = ExtResource("5_n3qhi") [node name="Character" parent="EditorTool" instance=ExtResource("18_2ae4v")] diff --git a/script/_global/enum.gd b/script/_global/enum.gd index 8a7ad17..760386e 100644 --- a/script/_global/enum.gd +++ b/script/_global/enum.gd @@ -11,7 +11,8 @@ enum EStance { None = 99, GroundAny = 100, AirAny = 101, + Any = 102, } enum EBreakLevel {None, Cancel, Jump, Break, Walk} #不可打断 取消技打断 跳跃打断 连招打断 行走打断 -enum ECoreType {Free, Lock, Passive} +enum ECoreType {Active, Passive} enum EGlobalEffect {CameraSize, CameraShake, ColorShift, Blur, SpeedLine} diff --git a/script/_global/stage.gd b/script/_global/stage.gd index e8bcf2c..81b37d4 100644 --- a/script/_global/stage.gd +++ b/script/_global/stage.gd @@ -3,7 +3,7 @@ class_name ViewManager func _ready(): Global.view_mgr = self - var camera = Global.camera_mgr as CameraManager + var camera: CameraManager = Global.camera_mgr as CameraManager size = camera.stage_size scale = camera.stage_scale position.y = - camera.stage_offset_y diff --git a/script/_global/util.gd b/script/_global/util.gd index 6398433..8fb34f8 100644 --- a/script/_global/util.gd +++ b/script/_global/util.gd @@ -11,189 +11,198 @@ func snap_float(value: float) -> float: return floor(value/Setting.pixel_size) * func dir_angle(dir: Vector2) -> float: - dir.x = abs(dir.x) - return dir.angle_to(Vector2.RIGHT) + dir.x = abs(dir.x) + return dir.angle_to(Vector2.RIGHT) func vector_reduce(vector: Vector2, reduce: float) -> Vector2: - var length: float = vector.length() - if length == 0: - return vector - var new_len = max(length - reduce, 0) - var scale_rate = new_len / length - return vector * scale_rate + var length: float = vector.length() + if length == 0: + return vector + var new_len = max(length - reduce, 0) + var scale_rate = new_len / length + return vector * scale_rate func raycast_wall(from: Vector3, to: Vector3) -> bool: - var space_state: PhysicsDirectSpaceState3D = get_world_3d().direct_space_state - var query: PhysicsRayQueryParameters3D = PhysicsRayQueryParameters3D.create(from, to, 1) - var result: Dictionary = space_state.intersect_ray(query) - return result.size()>0 + var space_state: PhysicsDirectSpaceState3D = get_world_3d().direct_space_state + var query: PhysicsRayQueryParameters3D = PhysicsRayQueryParameters3D.create(from, to, 1) + var result: Dictionary = space_state.intersect_ray(query) + return result.size()>0 func raycast_character(shape: Shape3D, origin: Vector3, dir: Vector2) -> Array[Character]: - var space_state: PhysicsDirectSpaceState3D = get_world_3d().direct_space_state - var query: PhysicsShapeQueryParameters3D = PhysicsShapeQueryParameters3D.new() - var angle: float = dir_angle(dir) - query.shape = shape - query.transform.origin = origin - query.transform.basis = query.transform.basis.rotated(Vector3.UP, angle) - var result: Array[Dictionary] = space_state.intersect_shape(query) - var result2: Array = result.map(func(v): return v["collider"]).filter(func(v): return v is Character) - var result3: Array[Character] - for node in result2: - result3.append(node as Character) - return result3 + var space_state: PhysicsDirectSpaceState3D = get_world_3d().direct_space_state + var query: PhysicsShapeQueryParameters3D = PhysicsShapeQueryParameters3D.new() + var angle: float = dir_angle(dir) + query.shape = shape + query.transform.origin = origin + query.transform.basis = query.transform.basis.rotated(Vector3.UP, angle) + var result: Array[Dictionary] = space_state.intersect_shape(query) + var result2: Array = result.map(func(v): return v["collider"]).filter(func(v): return v is Character) + var result3: Array[Character] + for node in result2: + result3.append(node as Character) + if result.size() > result3.size(): + result3.append(null) #特殊处理 表示命中非Character物体 例如墙体或地面 + return result3 + + +func clean_animation_lib(): + #删除技能配置中没有的animation文件 + #todo 非阻断 有空再说 + pass func refresh_animation_lib(): - var animation_library_path: String = "res://resource/skill_animation_library/animation_library.tres" - var animation_library = load(animation_library_path) + #刷新animation库 使其与animation文件同步 + var animation_library_path: String = "res://resource/skill_animation_library/animation_library.tres" + var animation_library = load(animation_library_path) - var dir_path: String = "res://resource/skill_animation" - var dir: DirAccess = DirAccess.open(dir_path) - for file in dir.get_files(): - var path: String = dir_path + "/" + file - var res = load(path) - if res is Animation: - var animation: Animation = res as Animation - var animation_name: String = Util.get_resource_name(animation) - print("refresh_animation_lib: ", animation_name) - animation_library.add_animation(animation_name, animation) - animation_library.animation_added.emit(animation_name) + var dir_path: String = "res://resource/skill_animation" + var dir: DirAccess = DirAccess.open(dir_path) + for file in dir.get_files(): + var path: String = dir_path + "/" + file + var res = load(path) + if res is Animation: + var animation: Animation = res as Animation + var animation_name: String = Util.get_resource_name(animation) + print("refresh_animation_lib: ", animation_name) + animation_library.add_animation(animation_name, animation) + animation_library.animation_added.emit(animation_name) - ResourceSaver.save(animation_library, animation_library_path) + ResourceSaver.save(animation_library, animation_library_path) func refresh_mesh_library(path_list: Array): - print("refresh_mesh_library") - var default_shape_full: Array[Variant] = [load("res://resource/mesh_library/default_shape_full.tres") as Shape3D, Transform3D.IDENTITY] - var default_shape_half: Array[Variant] = [load("res://resource/mesh_library/default_shape_half.tres") as Shape3D, Transform3D.IDENTITY] - var mesh_library: MeshLibrary = load("res://resource/mesh_library/mesh_library.tres") as MeshLibrary - for file_name_full in path_list: - var mesh_name = file_name_full.get_file().split('-')[0].trim_suffix('.vox') - print(mesh_name) - var mesh: Mesh = load(file_name_full) as Mesh - var mesh_id: int = mesh_library.find_item_by_name(mesh_name) - if mesh_id == -1: - mesh_id = mesh_library.get_last_unused_item_id() - mesh_library.create_item(mesh_id) - mesh_library.set_item_name(mesh_id, mesh_name) - mesh_library.set_item_mesh(mesh_id, mesh) - if mesh_name.begins_with("f_"): - mesh_library.set_item_shapes(mesh_id, default_shape_full) - elif mesh_name.begins_with("h_"): - mesh_library.set_item_shapes(mesh_id, default_shape_half) - elif mesh_name.begins_with("s_"): - var new_shape: Array[Variant] = [mesh.create_convex_shape(), Transform3D.IDENTITY] - mesh_library.set_item_shapes(mesh_id, new_shape) - var ids: PackedInt32Array = mesh_library.get_item_list() - var meshes: Array[Variant] = [] - for id in ids: - meshes.append(mesh_library.get_item_mesh(id)) - var previews: Array[Texture2D] = EditorInterface.make_mesh_previews(meshes, 64) - for i in range(len(ids)): - mesh_library.set_item_preview(ids[i], previews[i]) - ResourceSaver.save(mesh_library) + print("refresh_mesh_library") + var default_shape_full: Array[Variant] = [load("res://resource/mesh_library/default_shape_full.tres") as Shape3D, Transform3D.IDENTITY] + var default_shape_half: Array[Variant] = [load("res://resource/mesh_library/default_shape_half.tres") as Shape3D, Transform3D.IDENTITY] + var mesh_library: MeshLibrary = load("res://resource/mesh_library/mesh_library.tres") as MeshLibrary + for file_name_full in path_list: + var mesh_name = file_name_full.get_file().split('-')[0].trim_suffix('.vox') + print(mesh_name) + var mesh: Mesh = load(file_name_full) as Mesh + var mesh_id: int = mesh_library.find_item_by_name(mesh_name) + if mesh_id == -1: + mesh_id = mesh_library.get_last_unused_item_id() + mesh_library.create_item(mesh_id) + mesh_library.set_item_name(mesh_id, mesh_name) + mesh_library.set_item_mesh(mesh_id, mesh) + if mesh_name.begins_with("f_"): + mesh_library.set_item_shapes(mesh_id, default_shape_full) + elif mesh_name.begins_with("h_"): + mesh_library.set_item_shapes(mesh_id, default_shape_half) + elif mesh_name.begins_with("s_"): + var new_shape: Array[Variant] = [mesh.create_convex_shape(), Transform3D.IDENTITY] + mesh_library.set_item_shapes(mesh_id, new_shape) + var ids: PackedInt32Array = mesh_library.get_item_list() + var meshes: Array[Variant] = [] + for id in ids: + meshes.append(mesh_library.get_item_mesh(id)) + var previews: Array[Texture2D] = EditorInterface.make_mesh_previews(meshes, 64) + for i in range(len(ids)): + mesh_library.set_item_preview(ids[i], previews[i]) + ResourceSaver.save(mesh_library) func refresh_all_animation_by_sprite_frames(sprite_frames: SpriteFrames): - var dir_path: String = "res://resource/skill_animation" - var dir: DirAccess = DirAccess.open(dir_path) - var sprite_frames_name: String = sprite_frames.resource_path.get_file().split('-')[0] - for file in dir.get_files(): - var path: String = dir_path + "/" + file - var res = load(path) - if not res is Animation: - continue - var animation: Animation = res as Animation - var sprite_frames_track: int = animation.find_track(NodePath("View:sprite_frames"), Animation.TYPE_VALUE) - if sprite_frames_track < 0: - continue - var sprite_frames_track_key_count: int = animation.track_get_key_count(sprite_frames_track) - if sprite_frames_track_key_count == 0: - continue - var sprite_frames_value: SpriteFrames = animation.track_get_key_value(sprite_frames_track, 0) as SpriteFrames - var target_sprite_frames_name: String = sprite_frames_value.resource_path.get_file().split('-')[0] - if sprite_frames_name != target_sprite_frames_name: - continue - var animation_track: int = animation.find_track(NodePath("View:animation"), Animation.TYPE_VALUE) - if animation_track < 0: - continue - var animation_track_key_count: int = animation.track_get_key_count(animation_track) - if animation_track_key_count == 0: - continue - var animation_value: String = animation.track_get_key_value(animation_track, 0) as String - refresh_animation_by_sprite_frames(path, sprite_frames, animation_value, animation) - Util.refresh_animation_lib() + var dir_path: String = "res://resource/skill_animation" + var dir: DirAccess = DirAccess.open(dir_path) + var sprite_frames_name: String = sprite_frames.resource_path.get_file().split('-')[0] + for file in dir.get_files(): + var path: String = dir_path + "/" + file + var res = load(path) + if not res is Animation: + continue + var animation: Animation = res as Animation + var sprite_frames_track: int = animation.find_track(NodePath("View:sprite_frames"), Animation.TYPE_VALUE) + if sprite_frames_track < 0: + continue + var sprite_frames_track_key_count: int = animation.track_get_key_count(sprite_frames_track) + if sprite_frames_track_key_count == 0: + continue + var sprite_frames_value: SpriteFrames = animation.track_get_key_value(sprite_frames_track, 0) as SpriteFrames + var target_sprite_frames_name: String = sprite_frames_value.resource_path.get_file().split('-')[0] + if sprite_frames_name != target_sprite_frames_name: + continue + var animation_track: int = animation.find_track(NodePath("View:animation"), Animation.TYPE_VALUE) + if animation_track < 0: + continue + var animation_track_key_count: int = animation.track_get_key_count(animation_track) + if animation_track_key_count == 0: + continue + var animation_value: String = animation.track_get_key_value(animation_track, 0) as String + refresh_animation_by_sprite_frames(path, sprite_frames, animation_value, animation) + Util.refresh_animation_lib() func refresh_animation_by_sprite_frames(animation_path: String, sprite_frames: SpriteFrames, animation_name: String, animation: Animation) -> void: - if not sprite_frames.has_animation(animation_name): - print("动画不存在: ", animation_name) - return - var track_sprite_frames: int = animation.find_track(NodePath("View:sprite_frames"), Animation.TYPE_VALUE) - if track_sprite_frames < 0: - track_sprite_frames = animation.add_track(Animation.TYPE_VALUE) - animation.track_set_path(track_sprite_frames, "View:sprite_frames") - animation.track_insert_key(track_sprite_frames, 0, sprite_frames) - - var track_animation: int = animation.find_track(NodePath("View:animation"), Animation.TYPE_VALUE) - if track_animation < 0: - track_animation = animation.add_track(Animation.TYPE_VALUE) - animation.track_set_path(track_animation, "View:animation") - animation.track_insert_key(track_animation, 0, animation_name) - - var track_frame: int = animation.find_track(NodePath("View:frame"), Animation.TYPE_VALUE) - if track_frame >= 0: - animation.remove_track(track_frame) - track_frame = animation.add_track(Animation.TYPE_VALUE) - animation.track_set_path(track_frame, "View:frame") - var animation_speed: float = Setting.animation_frame_rate - var animation_frame_count: int = sprite_frames.get_frame_count(animation_name) - animation.length = animation_speed*animation_frame_count - for i in range(0, animation_frame_count): - var time = i * animation_speed - animation.track_insert_key(track_frame, time, i) - animation.value_track_set_update_mode(track_sprite_frames, Animation.UPDATE_DISCRETE) - animation.value_track_set_update_mode(track_animation, Animation.UPDATE_DISCRETE) - animation.value_track_set_update_mode(track_frame, Animation.UPDATE_DISCRETE) - print("refresh_animation: ", animation_name, "(", animation_frame_count, " frames)") - ResourceSaver.save(animation, animation_path) - - -func get_all_skill_player_weapon() -> Array[SkillPlayerCfg]: - var ret: Array[SkillPlayerCfg] = [] - var dir_path: String = "res://config/skill_player_weapon" - var dir: DirAccess = DirAccess.open(dir_path) - for file in dir.get_files(): - var path: String = dir_path + "/" + file - var res = load(path) - if res is SkillPlayerCfg: - ret.append(res) - return ret - - -func get_all_skill_player_basic() -> Array[SkillPlayerCfg]: - var ret: Array[SkillPlayerCfg] = [] + if not sprite_frames.has_animation(animation_name): + print("动画不存在: ", animation_name) + return + var track_sprite_frames: int = animation.find_track(NodePath("View:sprite_frames"), Animation.TYPE_VALUE) + if track_sprite_frames < 0: + track_sprite_frames = animation.add_track(Animation.TYPE_VALUE) + animation.track_set_path(track_sprite_frames, "View:sprite_frames") + animation.track_insert_key(track_sprite_frames, 0, sprite_frames) + + var track_animation: int = animation.find_track(NodePath("View:animation"), Animation.TYPE_VALUE) + if track_animation < 0: + track_animation = animation.add_track(Animation.TYPE_VALUE) + animation.track_set_path(track_animation, "View:animation") + animation.track_insert_key(track_animation, 0, animation_name) + + var track_frame: int = animation.find_track(NodePath("View:frame"), Animation.TYPE_VALUE) + if track_frame >= 0: + animation.remove_track(track_frame) + track_frame = animation.add_track(Animation.TYPE_VALUE) + animation.track_set_path(track_frame, "View:frame") + var animation_speed: float = Setting.animation_frame_rate + var animation_frame_count: int = sprite_frames.get_frame_count(animation_name) + animation.length = animation_speed*animation_frame_count + for i in range(0, animation_frame_count): + var time = i * animation_speed + animation.track_insert_key(track_frame, time, i) + animation.value_track_set_update_mode(track_sprite_frames, Animation.UPDATE_DISCRETE) + animation.value_track_set_update_mode(track_animation, Animation.UPDATE_DISCRETE) + animation.value_track_set_update_mode(track_frame, Animation.UPDATE_DISCRETE) + print("refresh_animation: ", animation_name, "(", animation_frame_count, " frames)") + ResourceSaver.save(animation, animation_path) + + +func get_all_skill_player_weapon() -> Array[SkillWeaponCfg]: + var ret: Array[SkillWeaponCfg] = [] + var dir_path: String = "res://config/skill_player_weapon" + var dir: DirAccess = DirAccess.open(dir_path) + for file in dir.get_files(): + var path: String = dir_path + "/" + file + var res = load(path) + if res is SkillWeaponCfg: + ret.append(res) + return ret + + +func get_all_skill_player_basic() -> Array[SkillWeaponCfg]: + var ret: Array[SkillWeaponCfg] = [] var dir_path: String = "res://config/skill_player_basic" var dir: DirAccess = DirAccess.open(dir_path) for file in dir.get_files(): var path: String = dir_path + "/" + file var res = load(path) - if res is SkillPlayerCfg: + if res is SkillWeaponCfg: ret.append(res) return ret -func get_skill_player_weapon_by_weapon(weapon: WeaponCfg) -> Array[SkillPlayerCfg]: - var ret: Array[SkillPlayerCfg] = [] - var dir_path: String = "res://config/skill_player_weapon" - var dir: DirAccess = DirAccess.open(dir_path) - for file in dir.get_files(): - var path: String = dir_path + "/" + file - var res = load(path) - if res is SkillPlayerCfg: - if res.weapon == weapon: - ret.append(res) - return ret +func get_skill_player_weapon_by_weapon(weapon: WeaponCfg) -> Array[SkillWeaponCfg]: + var ret: Array[SkillWeaponCfg] = [] + var dir_path: String = "res://config/skill_player_weapon" + var dir: DirAccess = DirAccess.open(dir_path) + for file in dir.get_files(): + var path: String = dir_path + "/" + file + var res = load(path) + if res is SkillWeaponCfg: + if res.weapon == weapon: + ret.append(res) + return ret diff --git a/script/ai/action/action_attack1.gd b/script/ai/action/action_attack1.gd new file mode 100644 index 0000000..b1e6ac3 --- /dev/null +++ b/script/ai/action/action_attack1.gd @@ -0,0 +1,10 @@ +extends Action +class_name ActionAttack1 + +func run(character: Character) -> int: + var is_hit: bool = character.attack1() + if is_hit: + return SUCCESS + else: + return FAILURE + diff --git a/script/ai/action/action_attack2.gd b/script/ai/action/action_attack2.gd new file mode 100644 index 0000000..5f03e1f --- /dev/null +++ b/script/ai/action/action_attack2.gd @@ -0,0 +1,10 @@ +extends Action +class_name ActionAttack2 + +func run(character: Character) -> int: + var is_hit: bool = character.attack2() + if is_hit: + return SUCCESS + else: + return FAILURE + diff --git a/script/ai/action/action_destroy.gd b/script/ai/action/action_destroy.gd new file mode 100644 index 0000000..1c45773 --- /dev/null +++ b/script/ai/action/action_destroy.gd @@ -0,0 +1,7 @@ +extends Action +class_name ActionDestroy + +func run(character: Character) -> int: + Global.character_mgr.destroy_character(character.id()) + return SUCCESS + diff --git a/script/ai/action/action_find_target.gd b/script/ai/action/action_find_target.gd index 5f8d019..30dccf0 100644 --- a/script/ai/action/action_find_target.gd +++ b/script/ai/action/action_find_target.gd @@ -2,6 +2,5 @@ extends Action class_name ActionFindTarget func run(character: Character) -> int: - var player_id = Global.character_mgr.get_player_id() - character.set_target(player_id) + character.move_stop() return SUCCESS diff --git a/script/ai/action/action_stop_move.gd b/script/ai/action/action_stop_move.gd new file mode 100644 index 0000000..b5262cd --- /dev/null +++ b/script/ai/action/action_stop_move.gd @@ -0,0 +1,7 @@ +extends Action +class_name ActionStopMove + +func run(character: Character) -> int: + var player_id: int = Global.character_mgr.get_player_id() + character.set_target(player_id) + return SUCCESS diff --git a/script/ai/action_with_target/action_move_to_target.gd b/script/ai/action_with_target/action_move_to_target.gd index 277534f..ea5a357 100644 --- a/script/ai/action_with_target/action_move_to_target.gd +++ b/script/ai/action_with_target/action_move_to_target.gd @@ -2,8 +2,8 @@ extends ActionWithTarget class_name ActionMoveToTarget func execute(character: Character, target: Character) -> int: - var dir = target.pos2D() - character.pos2D() - var dist = dir.length() + var dir: Vector2 = target.pos2D() - character.pos2D() + var dist: float = dir.length() if dist < 1: character.move_stop() else: diff --git a/script/character/ai/ai.gd b/script/character/ai/ai.gd index c005a48..ae9fdee 100644 --- a/script/character/ai/ai.gd +++ b/script/character/ai/ai.gd @@ -1,9 +1,28 @@ extends Node3D class_name AI -@onready var character = (get_owner() as Character) -@onready var status = (%Status as Status) +@onready var character: Character = (get_owner() as Character) +@onready var status: Status = (%Status as Status) +var is_init: bool = false +var has_ai: bool = false -func _ready(): + +func _process(delta) -> void: + if is_init: + if has_ai: on_process(delta) + return + + if not status.cfg: + return + is_init = true + var ai: PackedScene = status.cfg.get_ai() + if not ai: + return + var ai_node: Node = ai.instantiate() + add_child(ai_node) + has_ai = true + + +func on_process(delta): pass diff --git a/script/character/ai/bullet_ai.gd b/script/character/ai/bullet_ai.gd index a43ef07..b5389ea 100644 --- a/script/character/ai/bullet_ai.gd +++ b/script/character/ai/bullet_ai.gd @@ -1,5 +1,10 @@ extends AI class_name BulletAI -func _ready(): - pass +var alive_time: float = 0 + + +func on_process(delta): + alive_time += delta + if alive_time >= 5: + Global.character_mgr.destroy_character(character.id()) diff --git a/script/character/ai/monster_ai.gd b/script/character/ai/monster_ai.gd index ef6e8c1..d5953df 100644 --- a/script/character/ai/monster_ai.gd +++ b/script/character/ai/monster_ai.gd @@ -1,5 +1,5 @@ extends AI class_name MonsterAI -func _ready(): +func on_process(): pass diff --git a/script/character/battle.gd b/script/character/battle.gd index 5604d3a..0bf65a8 100644 --- a/script/character/battle.gd +++ b/script/character/battle.gd @@ -16,25 +16,37 @@ class HitInfo: var attack: AttackCfg -func attack1(): +func attack1() -> void: if not status.skill_cfg: return var attack: AttackCfg = status.skill_cfg.get_attack1() var attack_box: AttackBoxCfg = status.skill_cfg.get_attack1_box() - call_deferred("_attack", attack, attack_box) + _attack(attack, attack_box) -func attack2(): +func attack2() -> void: if not status.skill_cfg: return var attack: AttackCfg = status.skill_cfg.get_attack2() var attack_box: AttackBoxCfg = status.skill_cfg.get_attack2_box() - call_deferred("_attack", attack, attack_box) + _attack(attack, attack_box) -func _attack(attack: AttackCfg, attack_box: AttackBoxCfg): +func character_attack1() -> bool: + var attack: AttackCfg = status.cfg.get_attack1() + var attack_box: AttackBoxCfg = status.cfg.get_attack1_box() + return _attack(attack, attack_box) + + +func character_attack2() -> bool: + var attack: AttackCfg = status.cfg.get_attack2() + var attack_box: AttackBoxCfg = status.cfg.get_attack2_box() + return _attack(attack, attack_box) + + +func _attack(attack: AttackCfg, attack_box: AttackBoxCfg) -> bool: if not attack or not attack_box: - return + return false var pos: Vector3 = character.pos() var attack_dir: Vector2 = status.skill_dir.normalized() var offset_xz: Vector2 = attack_dir * attack_box.offset.x @@ -43,23 +55,29 @@ func _attack(attack: AttackCfg, attack_box: AttackBoxCfg): var shape: Shape3D = attack_box.shape _debug_draw_attack_box(shape, offset) var result: Array[Character] = Util.raycast_character(shape, pos+offset, attack_dir) - var is_stuck: bool = false + var is_hit: bool = false for target: Character in result: + if target == null: + is_hit = true + continue if target.team() == character.team(): continue target.add_attack(character.id(), attack_dir, attack) - is_stuck = true - if !is_stuck and !attack.is_force_pause: + is_hit = true + if !is_hit and !attack.is_force_pause: skill.on_attack_miss() + return is_hit - -func _debug_draw_attack_box(shape: Shape3D, offset: Vector3): +func _debug_draw_attack_box(shape: Shape3D, offset: Vector3) -> void: + if not get_tree().debug_collisions_hint: + return if shape is BoxShape3D: var scale: Vector3 = shape.size character.cast_particle(ResourceManager.particle_debug_box, false, offset, scale) elif shape is CylinderShape3D: var scale: Vector3 = Vector3(shape.radius, shape.height, shape.radius) character.cast_particle(ResourceManager.particle_debug_cylinder, false, offset, scale) + return func add_attack(from: int, dir: Vector2, attack: AttackCfg): @@ -96,6 +114,7 @@ func settle(hit_info: HitInfo) -> bool: var is_kill: bool = false var is_break_skill: bool = false var pause_time: float = attack.pause_time + var is_remote: bool = character_from != character_from.get_character_owner() #造成伤害 var damage: float = attack.damage_rate * cfg_from.attack @@ -136,9 +155,10 @@ func settle(hit_info: HitInfo) -> bool: character_to.add_buff("stun_recover_cd", cfg_to.stun.recover_cd) #mp累加 - character_from.add_mp(damage * cfg_from.mp.add_rate_attack) - character_from.remove_buff("mp_recover") - character_from.add_buff("mp_recover_cd", status.cfg.mp.recover_cd) + if not is_remote: + character_from.add_mp(damage * cfg_from.mp.add_rate_attack) + character_from.remove_buff("mp_recover") + character_from.add_buff("mp_recover_cd", status.cfg.mp.recover_cd) character_to.add_mp(damage * cfg_to.mp.add_rate_hit) character_to.remove_buff("mp_recover") character_to.add_buff("mp_recover_cd", status.cfg.mp.recover_cd) @@ -188,7 +208,7 @@ func settle(hit_info: HitInfo) -> bool: character_to.add_buff("hit_up", attack.hit_up_duration) #停止自身位移 - if attack.is_stop_self: + if attack.is_stop_self and not is_remote: character_from.move_stop() character_from.set_status("skill_move_stop", true) @@ -197,7 +217,8 @@ func settle(hit_info: HitInfo) -> bool: Enum.EDamageType.Sharp: character_to.cast_particle(ResourceManager.particle_hit_sharp, false) Enum.EDamageType.Blunt: character_to.cast_particle(ResourceManager.particle_hit_blunt, false) Enum.EDamageType.Ground: character_to.cast_particle(ResourceManager.particle_hit_ground, false) - + _: pass + #抖动 character_to.add_buff("shake_x", 0.2, true) @@ -205,7 +226,8 @@ func settle(hit_info: HitInfo) -> bool: character_to.add_buff("flash_white", 0.1) #卡帧 - character_from.set_pause_time(pause_time) + if not is_remote: + character_from.set_pause_time(pause_time) character_to.set_pause_time(pause_time) #全局特效 @@ -253,5 +275,9 @@ func check_ground2(): skill.on_check_ground(2) +func cast_sub_character(): + skill.on_cast_sub_character() + + func stop(): move.stop() diff --git a/script/character/character.gd b/script/character/character.gd index d4924d6..2a28c9f 100644 --- a/script/character/character.gd +++ b/script/character/character.gd @@ -11,8 +11,9 @@ class_name Character @onready var effect: Effect = (%Effect as Effect) -func init(id: int, cfg: CharacterCfg, team: Enum.ETeam): +func init(id: int, cfg: CharacterCfg, team: Enum.ETeam, owner_id: int): status.id = id + status.owner_id = owner_id status.team = team status.cfg = cfg var half_height: float = Setting.pixel_size * cfg.sprite_harf_height @@ -31,6 +32,7 @@ func init(id: int, cfg: CharacterCfg, team: Enum.ETeam): view.init(cfg.sprite_frames) skill.init() effect.init(cfg.type, body_scale) + effect.cast_self_particle() func init_after(): @@ -174,3 +176,15 @@ func set_target(target: int): func cast_particle(resource: Resource, is_attach: bool, offset: Vector3 = Vector3.ZERO, scale: Vector3 = Vector3.ONE): effect.cast_particle(resource, is_attach, offset, scale) + + +func get_character_owner() -> Character: + var owner: Character = Global.character_mgr.get_character(status.owner_id) as Character + if owner: return owner + return self + +func attack1() -> bool: + return battle.character_attack1() + +func attack2() -> bool: + return battle.character_attack2() diff --git a/script/character/player/core.gd b/script/character/core.gd similarity index 68% rename from script/character/player/core.gd rename to script/character/core.gd index d6e913c..563f385 100644 --- a/script/character/player/core.gd +++ b/script/character/core.gd @@ -5,17 +5,13 @@ class_name Core @onready var status: Status = (%Status as Status) @onready var skill: Skill = (%Skill as Skill) @onready var move: Move = (%Move as Move) -@onready var combo: Combo = (%Combo as Combo) var active_core_action_list: Array[String] = ["free_attack_heavy", "free_attack_light", "free_jump", "free_interact", "lock_attack_heavy", "lock_attack_light", "lock_jump", "lock_interact"] func _ready(): - # test for i in range(8): status.core_active_list.append(null) - set_active_core(0, load("res://config/core/free01.tres") as CoreCfg) - set_active_core(1, load("res://config/core/free02.tres") as CoreCfg) func _process(delta): @@ -24,8 +20,6 @@ func _process(delta): func set_active_core(index: int, core: CoreCfg) -> void: match core.type: - Enum.ECoreType.Free: pass - Enum.ECoreType.Lock: index+=4 Enum.ECoreType.Passive: return _: pass if (index < 0) or (index >= 8): @@ -40,21 +34,20 @@ func set_active_core(index: int, core: CoreCfg) -> void: func on_add_active_core(index: int, core: CoreCfg): - for skill in core.skill_list: - var action: String = active_core_action_list[index] - combo.add_skill(action, skill) + var skill_cfg: SkillCfg = core.get_skill_cfg(0) + var action: String = active_core_action_list[index] + skill.add_skill(action, skill_cfg) func on_remove_active_core(index: int, core: CoreCfg): - for skill in core.skill_list: - var action: String = active_core_action_list[index] - combo.remove_skill(action, skill) + var skill_cfg: SkillCfg = core.get_skill_cfg(0) + var action: String = active_core_action_list[index] + skill.remove_skill(action, skill_cfg) func add_passive_core(core: CoreCfg) -> void: match core.type: - Enum.ECoreType.Free: return - Enum.ECoreType.Lock: return + Enum.ECoreType.Active: return _: pass status.core_passive_list.append(core) status.emit_status("core_passive_list") @@ -63,8 +56,7 @@ func add_passive_core(core: CoreCfg) -> void: func remove_passive_core(core: CoreCfg) -> void: match core.type: - Enum.ECoreType.Free: return - Enum.ECoreType.Lock: return + Enum.ECoreType.Active: return _: pass status.core_passive_list.filter(func(c): return c!=core) status.emit_status("core_passive_list") diff --git a/script/character/effect.gd b/script/character/effect.gd index 2fa230c..6c6c5bb 100644 --- a/script/character/effect.gd +++ b/script/character/effect.gd @@ -45,7 +45,7 @@ func _process(delta): if is_right != status.is_right: is_right = status.is_right for particle: Particle in particle_list(): - particle.scale.x = 1 if is_right else -1 + particle.scale.x = abs(particle.scale.x) * (1 if is_right else -1) #pause if is_pause != status.is_pause: is_pause = status.is_pause @@ -87,6 +87,13 @@ func cast_attack_particle2(): _cast_attack_particle(2, true) func cast_attack_particle2_release(): _cast_attack_particle(2, false) +func cast_self_particle() -> void: + if !status.cfg: + return + var particle: Resource = status.cfg.get_particle() + if !particle: + return + _cast_particle(particle, true, Vector3.ZERO, Vector3.ZERO) func _cast_attack_particle(index: int, is_attach: bool) -> void: if !status.skill_cfg: diff --git a/script/character/move.gd b/script/character/move.gd index 2313b3d..37761e9 100644 --- a/script/character/move.gd +++ b/script/character/move.gd @@ -95,4 +95,4 @@ func jump(): buff.add_buff("jumping", 0.1) func stop(): - character.velocity = Vector3.ZERO \ No newline at end of file + character.velocity = Vector3.ZERO diff --git a/script/character/player/combo.gd b/script/character/player/combo.gd index e8d6eb0..9551d38 100644 --- a/script/character/player/combo.gd +++ b/script/character/player/combo.gd @@ -5,13 +5,13 @@ class_name Combo @onready var status: Status = (%Status as Status) @onready var skill: Skill = (%Skill as Skill) @onready var move: Move = (%Move as Move) +@onready var core: Core = (%Core as Core) class InputData: var action: String var alive_time: float -var skill_map: Dictionary = {} #input -> skill[] var input_list: Array[Variant] = [] #指令缓存 @@ -22,6 +22,8 @@ func _ready(): #add_weapon(load("res://config/weapon/short.tres") as WeaponCfg) add_weapon(load("res://config/weapon/fist.tres") as WeaponCfg) + core.set_active_core(0, load("res://config/core/hero01_remote01.tres") as CoreCfg) + func _process(delta): update_input_alive(delta) @@ -83,22 +85,27 @@ func update_break_walk() -> bool: func update_break_by_level(break_level: Enum.EBreakLevel) -> bool: for i in range(0, len(input_list)): var input = input_list[i] - if not input.action in skill_map: + if not input.action in skill.skill_map: continue - for skill_cfg in skill_map[input.action]: - var skill_player_weapon_cfg: SkillPlayerCfg = skill_cfg as SkillPlayerCfg - if skill_player_weapon_cfg.break_level != break_level: + for skill_cfg: SkillCfg in skill.skill_map[input.action]: + #检查打断级别 + if skill_cfg.break_level != break_level: continue - var stance_from: int = skill_player_weapon_cfg.stance_from + #检查姿态 + var stance_from: int = skill_cfg.stance_from var check_any_ground: bool = (stance_from == Enum.EStance.GroundAny) and status.is_on_floor - var check_any_air: bool = (stance_from == Enum.EStance.AirAny) and not status.is_on_floor - if (stance_from != int(status.stance)) and not check_any_ground and not check_any_air: + var check_any_air: bool = (stance_from == Enum.EStance.AirAny) and not status.is_on_floor + var check_any: bool = (stance_from == Enum.EStance.Any) or check_any_ground or check_any_air + if (stance_from != int(status.stance)) and not check_any: continue - if skill_player_weapon_cfg.weapon: - if skill_player_weapon_cfg.weapon != status.weapon_list[status.weapon_index]: - continue + #检查武器限制 + if skill_cfg is SkillWeaponCfg: + if skill_cfg.weapon: + if skill_cfg.weapon != status.weapon_list[status.weapon_index]: + continue + #施放技能 skill.cast_skill(skill_cfg, status.input_dir) - status.stance = skill_player_weapon_cfg.stance_to + status.stance = skill_cfg.stance_to refresh_input(i) return true return false @@ -130,30 +137,18 @@ func add_input_action(action: String): input_list.append(new_input) -func add_skill(action: String, skillCfg: SkillPlayerCfg): - if not action in skill_map: - skill_map[action] = [] - skill_map[action].append(skillCfg) - - -func remove_skill(action: String, skillCfg: SkillPlayerCfg) -> void: - if not action in skill_map: - return - skill_map[action].filter(func(cfg): return cfg != skillCfg) - - func add_weapon(weapon: WeaponCfg): status.weapon_list.append(weapon) - for skill_player_weapon_res: SkillPlayerCfg in Util.get_skill_player_weapon_by_weapon(weapon): - var skill_player_weapon: SkillPlayerCfg = skill_player_weapon_res as SkillPlayerCfg - add_skill(skill_player_weapon.action, skill_player_weapon_res) + for skill_player_weapon: SkillWeaponCfg in Util.get_skill_player_weapon_by_weapon(weapon): + skill.add_skill(skill_player_weapon.action, skill_player_weapon) status.emit_status("weapon_list") status.set_status("weapon_index", 0) + func add_basic_skill(): - for skill_player_weapon_res: SkillPlayerCfg in Util.get_all_skill_player_basic(): - var skill_player_weapon: SkillPlayerCfg = skill_player_weapon_res as SkillPlayerCfg - add_skill(skill_player_weapon.action, skill_player_weapon_res) + for skill_player_weapon: SkillWeaponCfg in Util.get_all_skill_player_basic(): + skill.add_skill(skill_player_weapon.action, skill_player_weapon) + func weapon_index_change(dir: int) -> void: if not status.weapon_list: diff --git a/script/character/player/player_action.gd b/script/character/player/player_action.gd index a366edf..f0abdf6 100644 --- a/script/character/player/player_action.gd +++ b/script/character/player/player_action.gd @@ -8,7 +8,8 @@ class_name PlayerAction var is_lock_pressed: bool -func _process(delta): + +func _process(delta) -> void: var has_target: bool = status.target != 0 if is_lock_pressed == has_target: return @@ -19,6 +20,7 @@ func _process(delta): else: character.set_target(0) + func check_action(key: String, is_pressed: bool) -> bool: if is_pressed and check_action_pressed(key): return true @@ -34,7 +36,7 @@ func check_action_pressed(key: String) -> bool: "weapon_pre": combo.weapon_index_change(-1) "weapon_next": combo.weapon_index_change(1) "test_1": - Global.character_mgr.create_character(test_bullet, character.team(), character.pos()) + Global.character_mgr.create_character(ResourceManager.cfg_character_monster_test, Enum.ETeam.Monster, Vector3(5.5, 0, 2)) _: return false return true diff --git a/script/character/skill.gd b/script/character/skill.gd index 65dddd3..a07316f 100644 --- a/script/character/skill.gd +++ b/script/character/skill.gd @@ -6,17 +6,35 @@ class_name Skill @onready var status: Status = (%Status as Status) @onready var effect: Effect = (%Effect as Effect) +var skill_map: Dictionary = {} #input -> skillCfg[] + func init(): cancel_skill() +func add_skill(action: String, skillCfg: SkillCfg): + if not action in skill_map: + skill_map[action] = [] + skill_map[action].append(skillCfg) + + +func remove_skill(action: String, skillCfg: SkillCfg) -> void: + if not action in skill_map: + return + skill_map[action].filter(func(cfg): return cfg != skillCfg) + + func _process(delta): if status.is_skill_running and status.is_pause == is_playing(): if status.is_pause: pause(); else: play(); +func _on_animation_finished(_anim_name): + cancel_skill() + + func cast_skill(cfg: SkillCfg, cast_dir: Vector2): break_skill() if cast_dir.length() == 0: @@ -84,5 +102,10 @@ func on_check_ground(frame_offset: int) -> void: seek(frame_pos- Setting.animation_frame_rate / 2, true, true) -func _on_animation_finished(_anim_name): - cancel_skill() +func on_cast_sub_character() -> void: + var cfg: SkillCfg = status.skill_cfg + if not cfg or not cfg.sub_character: + return + var pos: Vector3 = character.pos() + var dir: Vector2 = status.skill_dir + Global.character_mgr.create_character(cfg.sub_character, status.team, pos, dir, status.id) diff --git a/script/character/status.gd b/script/character/status.gd index f2ac7e2..8a8aa96 100644 --- a/script/character/status.gd +++ b/script/character/status.gd @@ -70,7 +70,7 @@ class_name Status @export var weapon_index: int #当前武器下标 @export var weapon_index_change_dir: int #武器下标操作变化方向 @export var weapon_index_change_rate: float #武器下标操作变化进度 -@export var core_active_list: Array[Variant] = [] #主动核心列表 4free 4lock +@export var core_active_list: Array[Variant] = [] #主动核心列表 8个 @export var core_passive_list: Array[Variant] = [] #被动核心列表 @export var is_switch: bool #是否切换到核心释放模式 @export_category("动画触发器") diff --git a/script/character/view.gd b/script/character/view.gd index 0e85b47..553d8fe 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -13,7 +13,7 @@ class Trans: var trigger_name: StringName var on_end: bool -var trans_list: Array[Variant] = [] +var trans_list: Array[Trans] = [] var move_sprite_frames: SpriteFrames @@ -76,6 +76,8 @@ func _ready(): func _process(delta) -> void: + if not sprite_frames: + return if not status.is_skill_running and status.is_pause == is_playing(): if status.is_pause: pause() else: play_animation(animation) @@ -137,7 +139,7 @@ func update_trans(on_end: bool): for trans in trans_list: if on_end != trans.on_end: continue - if not (trans.from == "any" or trans.from == animation): + if not ((trans.from == "any") or (trans.from == animation)): continue if trans.condition != "": var conditionValue = status.get(trans.condition) @@ -167,9 +169,9 @@ func _on_animation_finished(): update_trans(true) -func update_material(): +func update_material() -> void: call_deferred("_update_material") - + return func _update_material(): var material: ShaderMaterial = material_override as ShaderMaterial @@ -186,6 +188,8 @@ func _update_material(): func play_animation(animation_name: String) -> void: + if not sprite_frames: + return if not sprite_frames.has_animation(animation_name): print("无效动画:", animation_name) return diff --git a/script/config/character_cfg.gd b/script/config/character_cfg.gd index cc2f6ab..03064ba 100644 --- a/script/config/character_cfg.gd +++ b/script/config/character_cfg.gd @@ -16,3 +16,35 @@ class_name CharacterCfg #战斗信息 @export var hp_max: float @export var attack: float +#自带技能参数 +@export var attack1: AttackCfg +@export var attack1_box: AttackBoxCfg +@export var attack2: AttackCfg +@export var attack2_box: AttackBoxCfg +@export var sub_character: CharacterCfg + + +func get_attack1()->AttackCfg: return attack1 if attack1 else ResourceManager.cfg_attack_normal + + +func get_attack1_box()->AttackBoxCfg: return attack1_box if attack1_box else ResourceManager.cfg_attack_box_normal + + +func get_attack2()->AttackCfg: return attack2 if attack2 else ResourceManager.cfg_attack_normal + + +func get_attack2_box()->AttackBoxCfg: return attack2_box if attack2_box else ResourceManager.cfg_attack_box_normal + +func get_particle()->Resource: + var res_name: String = Util.get_resource_name(self) + var path_default: String = "res://scene/effect/particle/%s.tscn" % res_name + if ResourceLoader.exists(path_default): + return load(path_default) + return null + +func get_ai()->PackedScene: + var res_name: String = Util.get_resource_name(self) + var path_default: String = "res://scene/ai/%s.tscn" % res_name + if ResourceLoader.exists(path_default): + return load(path_default) as PackedScene + return null \ No newline at end of file diff --git a/script/config/core_cfg.gd b/script/config/core_cfg.gd index de156b3..f27b673 100644 --- a/script/config/core_cfg.gd +++ b/script/config/core_cfg.gd @@ -3,9 +3,9 @@ class_name CoreCfg @export var name: String @export var type: Enum.ECoreType -@export var skill_list: Array[SkillPlayerCfg] var icon: Texture2D +var skill_cfg: Dictionary = {} func get_icon()->Texture2D: @@ -17,3 +17,20 @@ func get_icon()->Texture2D: else: icon = load("res://resource/ui/icon/core/default.png") as Texture2D return icon + + +func get_skill_cfg(index: int)->SkillCfg: + if index in skill_cfg: + return skill_cfg[index] + var res_name: String = Util.get_resource_name(self) + var path_index: String = "res://config/skill_core/%s_%d.tres" % [res_name, index] + if ResourceLoader.exists(path_index): + skill_cfg[index] = load(path_index) as SkillCfg + else: + var path_default: String = "res://config/skill_core/%s.tres" % res_name + if ResourceLoader.exists(path_default): + skill_cfg[index] = load(path_default) as SkillCfg + if index in skill_cfg: + return skill_cfg[index] + print("无效的技能配置: %s_%d" % [res_name, index]) + return null diff --git a/script/config/player_skill_cfg.gd b/script/config/player_skill_cfg.gd deleted file mode 100644 index f82b719..0000000 --- a/script/config/player_skill_cfg.gd +++ /dev/null @@ -1,10 +0,0 @@ -@tool -extends SkillCfg -class_name SkillPlayerCfg - -@export var weapon: WeaponCfg -@export var stance_from: Enum.EStance = Enum.EStance.GroundAny -@export var stance_to: Enum.EStance -@export var break_level: Enum.EBreakLevel = Enum.EBreakLevel.Break - -@export_enum("none", "attack_light", "attack_heavy", "flash") var action: String = "none" diff --git a/script/config/skill_cfg.gd b/script/config/skill_cfg.gd index 7ac0b6b..942dbb9 100644 --- a/script/config/skill_cfg.gd +++ b/script/config/skill_cfg.gd @@ -4,17 +4,24 @@ class_name SkillCfg @export var name: String @export var skill_animation: Animation +@export var range: float @export var free_lock: bool @export var ignore_push: bool @export var attack1: AttackCfg @export var attack1_box: AttackBoxCfg @export var attack2: AttackCfg @export var attack2_box: AttackBoxCfg +@export var sub_character: CharacterCfg +@export var stance_from: Enum.EStance = Enum.EStance.GroundAny +@export var stance_to: Enum.EStance +@export var break_level: Enum.EBreakLevel = Enum.EBreakLevel.Break @export var refresh_animation: bool: get: return false set(value): if Engine.is_editor_hint(): check_animation() +var attack_particle: Dictionary = {} + func check_animation() -> bool: var res_name: String = Util.get_resource_name(self) @@ -54,8 +61,11 @@ func get_attack_particle(index: int)->Resource: var res_name: String = Util.get_resource_name(self) var path_index: String = "res://scene/effect/particle/%s_%d.tscn" % [res_name, index] if ResourceLoader.exists(path_index): - return load(path_index) - var path_default: String = "res://scene/effect/particle/%s.tscn" % res_name - if ResourceLoader.exists(path_default): - return load(path_default) + attack_particle[index] = load(path_index) + else: + var path_default: String = "res://scene/effect/particle/%s.tscn" % res_name + if ResourceLoader.exists(path_default): + attack_particle[index] = load(path_default) + if index in attack_particle: + return attack_particle[index] return null diff --git a/script/config/skill_weapon_cfg.gd b/script/config/skill_weapon_cfg.gd new file mode 100644 index 0000000..8288e69 --- /dev/null +++ b/script/config/skill_weapon_cfg.gd @@ -0,0 +1,7 @@ +@tool +extends SkillCfg +class_name SkillWeaponCfg + +@export var weapon: WeaponCfg + +@export_enum("none", "attack_light", "attack_heavy", "flash") var action: String = "none" diff --git a/script/editor_tool/editor_tool.gd b/script/editor_tool/editor_tool.gd index 0ad18e5..de85be6 100644 --- a/script/editor_tool/editor_tool.gd +++ b/script/editor_tool/editor_tool.gd @@ -2,81 +2,90 @@ extends Node3D @export var refresh_animation_lib: bool: - get: return false - set(_value): - Util.refresh_animation_lib() + get: return false + set(_value): + Util.refresh_animation_lib() + +@export var clean_animation_lib: bool: + get: return false + set(_value): + Util.clean_animation_lib() @export var refresh_mesh_lib: bool: - get: return false - set(_value): - process_mesh_lib("res://resource/mesh_level") - print("done.") + get: return false + set(_value): + process_mesh_lib("res://resource/mesh_level") + print("done.") @export var refresh_uid: bool: - get: return false - set(_value): - process_dir("res://") - print("done.") + get: return false + set(_value): + process_dir("res://") + print("done.") var selected_skill_file: String func _process(delta: float) -> void: - if not Engine.is_editor_hint(): - return - var selected_paths = EditorInterface.get_selected_paths() - if len(selected_paths) != 1: - return - var selected_path = selected_paths[0] - if selected_skill_file == selected_path: - return - selected_skill_file = selected_path - if not selected_path.ends_with(".tres"): - return - var res := ResourceLoader.load(selected_path) - if not res is SkillCfg: - return - var skill_cfg = res as SkillCfg - - if not skill_cfg.skill_animation: - return - - var character_skill = $Character/Skill as AnimationPlayer - EditorInterface.edit_node(character_skill) - var animation_name: String = "animation_library/%s" % Util.get_resource_name(res) - character_skill.current_animation = animation_name - print(selected_path) - EditorInterface.edit_resource(res) - + if not get_node_or_null("Character"): + return + if not Engine.is_editor_hint(): + if $Character: + $Character.free() + return + var selected_paths: PackedStringArray = EditorInterface.get_selected_paths() + if len(selected_paths) != 1: + return + var selected_path: String = selected_paths[0] + if selected_skill_file == selected_path: + return + selected_skill_file = selected_path + if not selected_path.ends_with(".tres"): + return + var res := ResourceLoader.load(selected_path) + if not res is SkillCfg: + return + var skill_cfg: SkillCfg = res as SkillCfg + + if not skill_cfg.skill_animation: + return + + var character_skill: AnimationPlayer = $Character/Skill as AnimationPlayer + EditorInterface.edit_node(character_skill) + var animation_name: String = "animation_library/%s" % Util.get_resource_name(res) + character_skill.current_animation = animation_name + print(selected_path) + EditorInterface.edit_resource(res) + func process_mesh_lib(dir_name: String) -> void: - var dir := DirAccess.open(dir_name) - if not dir: - print("An error occurred when trying to access the path: ", dir_name) - return - var path_list: Array[Variant] = [] - dir.list_dir_begin() - for file_name in dir.get_files(): - if file_name.ends_with(".vox"): - path_list.append(dir_name + "/" + file_name) - Util.refresh_mesh_library(path_list) + var dir := DirAccess.open(dir_name) + if not dir: + print("An error occurred when trying to access the path: ", dir_name) + return + var path_list: Array[Variant] = [] + dir.list_dir_begin() + for file_name in dir.get_files(): + if file_name.ends_with(".vox"): + path_list.append(dir_name + "/" + file_name) + Util.refresh_mesh_library(path_list) func process_dir(dir_name: String) -> void: - var dir := DirAccess.open(dir_name) - if dir: - dir.list_dir_begin() - var file_name: String = dir.get_next() - if dir_name.ends_with("/"): - dir_name = dir_name.trim_suffix("/") - while file_name != "": - if dir.current_is_dir(): - print("-----" + dir_name + "/" + file_name + " -----") - process_dir(dir_name + "/" + file_name) - elif file_name.get_extension() in [ "tres", "res" ]: - print(dir_name + "/" + file_name) - var res := ResourceLoader.load(dir_name + "/" + file_name) - ResourceSaver.save(res) + var dir := DirAccess.open(dir_name) + if dir: + dir.list_dir_begin() + var file_name: String = dir.get_next() + if dir_name.ends_with("/"): + dir_name = dir_name.trim_suffix("/") + while file_name != "": + if dir.current_is_dir(): + print("-----" + dir_name + "/" + file_name + " -----") + process_dir(dir_name + "/" + file_name) + elif file_name.get_extension() in [ "tres", "res" ]: + print(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) + 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 b2ce314..333ef41 100644 --- a/script/manager/character_manager.gd +++ b/script/manager/character_manager.gd @@ -26,7 +26,7 @@ func on_level_loading_end(): if player: player.remove_buff("freeze") -func create_character(cfg: CharacterCfg, team: Enum.ETeam, pos: Vector3)->Character: +func create_character(cfg: CharacterCfg, team: Enum.ETeam, pos: Vector3, dir: Vector2 = Vector2.RIGHT, owner_id: int = 0)->Character: var characterNode: Node match cfg.type: Enum.ECharacterType.Player: characterNode = ResourceManager.scene_player.instantiate() @@ -38,13 +38,14 @@ func create_character(cfg: CharacterCfg, team: Enum.ETeam, pos: Vector3)->Charac var character: Character = characterNode as Character character_idx += 1 character_map[character_idx]=character - character.init(character_idx, cfg, team) + character.init(character_idx, cfg, team, owner_id) character.set_material(ResourceManager.material_character.duplicate(), ResourceManager.material_character_sub.duplicate()) character.set_pos(pos) SignalManager.character_create.emit(character_idx, cfg.type, character.ui_pos()) - if cfg.type == Enum.ECharacterType.Player: + if int(cfg.type) == Enum.ECharacterType.Player: player_id = character_idx character.init_after() + character.move_to(dir) return character @@ -58,7 +59,6 @@ func destroy_character(id: int) -> void: var character: Character = character_map[key] as Character if character.target() == id: character.set_target(0) - create_character(ResourceManager.cfg_character_monster_test, Enum.ETeam.Monster, Vector3(5.5, 0, 2)) return @@ -69,7 +69,7 @@ func get_character(id: int) -> Character: return null -func get_player() -> Character: +func get_player() -> Character: return get_character(player_id) diff --git a/script/manager/game_manager.gd b/script/manager/game_manager.gd index 6fe52fe..7451445 100644 --- a/script/manager/game_manager.gd +++ b/script/manager/game_manager.gd @@ -4,8 +4,6 @@ func _ready(): MetSys.set_save_data() Global.level_mgr.init() Global.character_mgr.create_character(ResourceManager.cfg_character_player, Enum.ETeam.Player, Vector3(5, 0, 2)) - Global.character_mgr.create_character(ResourceManager.cfg_character_monster_test, Enum.ETeam.Monster, Vector3(5.5, 0, 2)) - func _process(delta): pass