diff --git a/config/character/hero01.tres b/config/character/hero01.tres index 1b9eac8..879ecdf 100644 --- a/config/character/hero01.tres +++ b/config/character/hero01.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="CharacterCfg" load_steps=3 format=3 uid="uid://bjvrih37ni5nx"] +[gd_resource type="Resource" script_class="CharacterCfg" load_steps=4 format=3 uid="uid://bjvrih37ni5nx"] [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="1_2054l"] +[ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_ebj0w"] [ext_resource type="SpriteFrames" uid="uid://cijqp2fy7taqp" path="res://resource/animation/character/hero01_move.aseprite" id="2_cssb0"] [resource] @@ -10,5 +11,6 @@ type = 0 sprite_frames = ExtResource("2_cssb0") sprite_harf_height = 26 sprite_width = 16 +move = ExtResource("1_ebj0w") hp_max = 100.0 shield_max = 100.0 diff --git a/config/character/monster01.tres b/config/character/monster01.tres index 7b66c66..6120037 100644 --- a/config/character/monster01.tres +++ b/config/character/monster01.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="CharacterCfg" load_steps=3 format=3 uid="uid://b1gf2jimihmc7"] +[gd_resource type="Resource" script_class="CharacterCfg" load_steps=4 format=3 uid="uid://b1gf2jimihmc7"] [ext_resource type="Script" path="res://script/config/character_cfg.gd" id="1_4orbu"] +[ext_resource type="Resource" uid="uid://dx54fjf5t0uu8" path="res://config/character_move/normal.tres" id="1_b0lkj"] [ext_resource type="SpriteFrames" uid="uid://dy0krmwjhale" path="res://resource/animation/character/monster01_move.aseprite" id="2_su3hg"] [resource] @@ -10,5 +11,6 @@ type = 1 sprite_frames = ExtResource("2_su3hg") sprite_harf_height = 26 sprite_width = 16 +move = ExtResource("1_b0lkj") hp_max = 200.0 shield_max = 200.0 diff --git a/config/character_move/normal.tres b/config/character_move/normal.tres new file mode 100644 index 0000000..225369e --- /dev/null +++ b/config/character_move/normal.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" script_class="CharacterMoveCfg" load_steps=2 format=3 uid="uid://dx54fjf5t0uu8"] + +[ext_resource type="Script" path="res://script/config/character_move_cfg.gd" id="1_r4l81"] + +[resource] +script = ExtResource("1_r4l81") +speed = 1.5 +gravity_scale = 1.0 +jump_velocity = 3.0 diff --git a/config/player_skill/hero01_long_attack01.tres b/config/player_skill/hero01_long_attack01.tres new file mode 100644 index 0000000..9d8194e --- /dev/null +++ b/config/player_skill/hero01_long_attack01.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://b6x3jdiqtum6"] + +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_gik08"] +[ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="2_6nbpq"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_og1bb"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_id85o"] + +[resource] +script = ExtResource("1_gik08") +weapon = ExtResource("4_id85o") +stance_from = 0 +stance_to = 1 +name = "" +skill_animation = ExtResource("2_6nbpq") +has_animation = false +sprite_frams = ExtResource("3_og1bb") +animation_name = "long_attack01" diff --git a/config/player_skill/hero01_long_attack02.tres b/config/player_skill/hero01_long_attack02.tres new file mode 100644 index 0000000..96c87d8 --- /dev/null +++ b/config/player_skill/hero01_long_attack02.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://cs32884hwqxd7"] + +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_e0fqi"] +[ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_jrgan"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_novna"] + +[resource] +script = ExtResource("1_e0fqi") +weapon = ExtResource("4_novna") +stance_from = 1 +stance_to = 2 +name = "" +skill_animation = ExtResource("2_jrgan") +has_animation = true +sprite_frams = ExtResource("3_jidy7") +animation_name = "long_attack02" diff --git a/config/player_skill/hero01_long_attack03.tres b/config/player_skill/hero01_long_attack03.tres new file mode 100644 index 0000000..ce4320f --- /dev/null +++ b/config/player_skill/hero01_long_attack03.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://huxlxrmyulo"] + +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uaib7"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_8uqiw"] +[ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="2_ugt3f"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"] + +[resource] +script = ExtResource("1_uaib7") +weapon = ExtResource("2_8uqiw") +stance_from = 2 +stance_to = 3 +name = "" +skill_animation = ExtResource("2_ugt3f") +has_animation = true +sprite_frams = ExtResource("3_sr2og") +animation_name = "long_attack03" diff --git a/config/player_skill/hero01_long_attack04.tres b/config/player_skill/hero01_long_attack04.tres new file mode 100644 index 0000000..2c8ae60 --- /dev/null +++ b/config/player_skill/hero01_long_attack04.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://chuv8k5d44ln4"] + +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_xsxbs"] +[ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="2_sam6s"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_plyre"] + +[resource] +script = ExtResource("1_xsxbs") +weapon = ExtResource("4_plyre") +stance_from = 3 +stance_to = 4 +name = "" +skill_animation = ExtResource("2_sam6s") +has_animation = true +sprite_frams = ExtResource("3_w7h1m") +animation_name = "long_attack04" diff --git a/config/player_skill/hero01_long_normal_attack01.tres b/config/player_skill/hero01_long_normal_attack01.tres deleted file mode 100644 index afe988e..0000000 --- a/config/player_skill/hero01_long_normal_attack01.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://b6x3jdiqtum6"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_rossy"] -[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_eiqoa"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="2_h7r7b"] -[ext_resource type="Animation" uid="uid://b28xyr8shsxad" path="res://resource/skill_animation/hero01_long_normal_attack01.tres" id="2_xp4qp"] - -[resource] -script = ExtResource("1_rossy") -weapon = ExtResource("2_eiqoa") -name = "" -skill_animation = ExtResource("2_xp4qp") -has_animation = true -sprite_frams = ExtResource("2_h7r7b") -animation_name = "long_attack01" diff --git a/config/player_skill/hero01_long_normal_attack02.tres b/config/player_skill/hero01_long_normal_attack02.tres deleted file mode 100644 index 31fefb9..0000000 --- a/config/player_skill/hero01_long_normal_attack02.tres +++ /dev/null @@ -1,13 +0,0 @@ -[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=4 format=3 uid="uid://cs32884hwqxd7"] - -[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_oext1"] -[ext_resource type="Animation" uid="uid://cidi63jms7hxv" path="res://resource/skill_animation/hero01_long_normal_attack02.tres" id="2_x4jpa"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="3_o58di"] - -[resource] -script = ExtResource("1_oext1") -name = "" -skill_animation = ExtResource("2_x4jpa") -has_animation = true -sprite_frams = ExtResource("3_o58di") -animation_name = "long_attack02" diff --git a/config/player_skill/hero01_long_skill01.tres b/config/player_skill/hero01_long_skill01.tres new file mode 100644 index 0000000..c9488c4 --- /dev/null +++ b/config/player_skill/hero01_long_skill01.tres @@ -0,0 +1,17 @@ +[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://bi2ipbximefsr"] + +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_ud5ph"] +[ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="2_ewts2"] +[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"] +[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_3bf64"] + +[resource] +script = ExtResource("1_ud5ph") +weapon = ExtResource("4_3bf64") +stance_from = 1 +stance_to = 2 +name = "" +skill_animation = ExtResource("2_ewts2") +has_animation = true +sprite_frams = ExtResource("3_qwjfl") +animation_name = "long_skill01" diff --git a/resource/animation/character/hero01_fist_normal_attack.aseprite b/resource/animation/character/hero01_fist_attack.aseprite similarity index 100% rename from resource/animation/character/hero01_fist_normal_attack.aseprite rename to resource/animation/character/hero01_fist_attack.aseprite diff --git a/resource/animation/character/hero01_fist_normal_attack.aseprite.import b/resource/animation/character/hero01_fist_attack.aseprite.import similarity index 59% rename from resource/animation/character/hero01_fist_normal_attack.aseprite.import rename to resource/animation/character/hero01_fist_attack.aseprite.import index a388086..7f8bcea 100644 --- a/resource/animation/character/hero01_fist_normal_attack.aseprite.import +++ b/resource/animation/character/hero01_fist_attack.aseprite.import @@ -3,12 +3,12 @@ importer="Aseprite SpriteFrames Import" type="SpriteFrames" uid="uid://byb675xgcsh8e" -path="res://.godot/imported/hero01_fist_normal_attack.aseprite-95f09c0c217ce0c96e76b1facc702298.res" +path="res://.godot/imported/hero01_fist_attack.aseprite-7dfe4a93a426af5e96ee2559429e2317.res" [deps] -source_file="res://resource/animation/character/hero01_fist_normal_attack.aseprite" -dest_files=["res://.godot/imported/hero01_fist_normal_attack.aseprite-95f09c0c217ce0c96e76b1facc702298.res"] +source_file="res://resource/animation/character/hero01_fist_attack.aseprite" +dest_files=["res://.godot/imported/hero01_fist_attack.aseprite-7dfe4a93a426af5e96ee2559429e2317.res"] [params] diff --git a/resource/animation/character/hero01_fist_normal_attack.png b/resource/animation/character/hero01_fist_attack.png similarity index 100% rename from resource/animation/character/hero01_fist_normal_attack.png rename to resource/animation/character/hero01_fist_attack.png diff --git a/resource/animation/character/hero01_long_normal_attack.png.import b/resource/animation/character/hero01_fist_attack.png.import similarity index 63% rename from resource/animation/character/hero01_long_normal_attack.png.import rename to resource/animation/character/hero01_fist_attack.png.import index e0e4240..bffdf29 100644 --- a/resource/animation/character/hero01_long_normal_attack.png.import +++ b/resource/animation/character/hero01_fist_attack.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://b41h1ruloqsbu" -path="res://.godot/imported/hero01_long_normal_attack.png-c595b9e179165283fdc80e8a880f2d52.ctex" +uid="uid://cdjtgcf8wejvp" +path="res://.godot/imported/hero01_fist_attack.png-f1afb7dc0fba0b912c21d29a7d4778c4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/animation/character/hero01_long_normal_attack.png" -dest_files=["res://.godot/imported/hero01_long_normal_attack.png-c595b9e179165283fdc80e8a880f2d52.ctex"] +source_file="res://resource/animation/character/hero01_fist_attack.png" +dest_files=["res://.godot/imported/hero01_fist_attack.png-f1afb7dc0fba0b912c21d29a7d4778c4.ctex"] [params] diff --git a/resource/animation/character/hero01_long_normal_attack.aseprite b/resource/animation/character/hero01_long_attack.aseprite similarity index 100% rename from resource/animation/character/hero01_long_normal_attack.aseprite rename to resource/animation/character/hero01_long_attack.aseprite diff --git a/resource/animation/character/hero01_long_normal_attack.aseprite.import b/resource/animation/character/hero01_long_attack.aseprite.import similarity index 59% rename from resource/animation/character/hero01_long_normal_attack.aseprite.import rename to resource/animation/character/hero01_long_attack.aseprite.import index 506bfce..fbd85b1 100644 --- a/resource/animation/character/hero01_long_normal_attack.aseprite.import +++ b/resource/animation/character/hero01_long_attack.aseprite.import @@ -3,12 +3,12 @@ importer="Aseprite SpriteFrames Import" type="SpriteFrames" uid="uid://7swf8owxd63i" -path="res://.godot/imported/hero01_long_normal_attack.aseprite-b89de8793f639d186824cdda0deba280.res" +path="res://.godot/imported/hero01_long_attack.aseprite-1eb1b1c401bab6096584ad713f059357.res" [deps] -source_file="res://resource/animation/character/hero01_long_normal_attack.aseprite" -dest_files=["res://.godot/imported/hero01_long_normal_attack.aseprite-b89de8793f639d186824cdda0deba280.res"] +source_file="res://resource/animation/character/hero01_long_attack.aseprite" +dest_files=["res://.godot/imported/hero01_long_attack.aseprite-1eb1b1c401bab6096584ad713f059357.res"] [params] diff --git a/resource/animation/character/hero01_long_normal_attack.png b/resource/animation/character/hero01_long_attack.png similarity index 100% rename from resource/animation/character/hero01_long_normal_attack.png rename to resource/animation/character/hero01_long_attack.png diff --git a/resource/animation/character/hero01_fist_normal_attack.png.import b/resource/animation/character/hero01_long_attack.png.import similarity index 63% rename from resource/animation/character/hero01_fist_normal_attack.png.import rename to resource/animation/character/hero01_long_attack.png.import index 5493a94..8b53bdd 100644 --- a/resource/animation/character/hero01_fist_normal_attack.png.import +++ b/resource/animation/character/hero01_long_attack.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://b6efmetcmgml5" -path="res://.godot/imported/hero01_fist_normal_attack.png-39b35fd04723c1d23c532c0dfc3b7204.ctex" +uid="uid://cnvx7kg7vd1ne" +path="res://.godot/imported/hero01_long_attack.png-54e26e890d7bd9dab3f6410116d7d1f5.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/animation/character/hero01_fist_normal_attack.png" -dest_files=["res://.godot/imported/hero01_fist_normal_attack.png-39b35fd04723c1d23c532c0dfc3b7204.ctex"] +source_file="res://resource/animation/character/hero01_long_attack.png" +dest_files=["res://.godot/imported/hero01_long_attack.png-54e26e890d7bd9dab3f6410116d7d1f5.ctex"] [params] diff --git a/resource/animation/character/hero01_short_normal_attack.aseprite b/resource/animation/character/hero01_short_attack.aseprite similarity index 100% rename from resource/animation/character/hero01_short_normal_attack.aseprite rename to resource/animation/character/hero01_short_attack.aseprite diff --git a/resource/animation/character/hero01_short_normal_attack.aseprite.import b/resource/animation/character/hero01_short_attack.aseprite.import similarity index 59% rename from resource/animation/character/hero01_short_normal_attack.aseprite.import rename to resource/animation/character/hero01_short_attack.aseprite.import index 3771c7a..a427072 100644 --- a/resource/animation/character/hero01_short_normal_attack.aseprite.import +++ b/resource/animation/character/hero01_short_attack.aseprite.import @@ -3,12 +3,12 @@ importer="Aseprite SpriteFrames Import" type="SpriteFrames" uid="uid://0ndib0ohw7fs" -path="res://.godot/imported/hero01_short_normal_attack.aseprite-0b64e59d17799d1f79dcc245982a3381.res" +path="res://.godot/imported/hero01_short_attack.aseprite-cdc5d20a14134071b2c45362687623d0.res" [deps] -source_file="res://resource/animation/character/hero01_short_normal_attack.aseprite" -dest_files=["res://.godot/imported/hero01_short_normal_attack.aseprite-0b64e59d17799d1f79dcc245982a3381.res"] +source_file="res://resource/animation/character/hero01_short_attack.aseprite" +dest_files=["res://.godot/imported/hero01_short_attack.aseprite-cdc5d20a14134071b2c45362687623d0.res"] [params] diff --git a/resource/animation/character/hero01_short_normal_attack.png b/resource/animation/character/hero01_short_attack.png similarity index 100% rename from resource/animation/character/hero01_short_normal_attack.png rename to resource/animation/character/hero01_short_attack.png diff --git a/resource/animation/character/hero01_short_normal_attack.png.import b/resource/animation/character/hero01_short_attack.png.import similarity index 63% rename from resource/animation/character/hero01_short_normal_attack.png.import rename to resource/animation/character/hero01_short_attack.png.import index 4af9470..e1281d1 100644 --- a/resource/animation/character/hero01_short_normal_attack.png.import +++ b/resource/animation/character/hero01_short_attack.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bewrmnrjslp1q" -path="res://.godot/imported/hero01_short_normal_attack.png-eb57cd392b867e422191450f06a09aeb.ctex" +uid="uid://b1bux8mwc5tt5" +path="res://.godot/imported/hero01_short_attack.png-f7efa0b1aba901e26857e7baf3ecbc42.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/animation/character/hero01_short_normal_attack.png" -dest_files=["res://.godot/imported/hero01_short_normal_attack.png-eb57cd392b867e422191450f06a09aeb.ctex"] +source_file="res://resource/animation/character/hero01_short_attack.png" +dest_files=["res://.godot/imported/hero01_short_attack.png-f7efa0b1aba901e26857e7baf3ecbc42.ctex"] [params] diff --git a/resource/skill_animation/hero01_long_normal_attack02.tres b/resource/skill_animation/hero01_long_attack01.tres similarity index 78% rename from resource/skill_animation/hero01_long_normal_attack02.tres rename to resource/skill_animation/hero01_long_attack01.tres index 4b70660..e3a023a 100644 --- a/resource/skill_animation/hero01_long_normal_attack02.tres +++ b/resource/skill_animation/hero01_long_attack01.tres @@ -1,9 +1,10 @@ -[gd_resource type="Animation" load_steps=2 format=3 uid="uid://cidi63jms7hxv"] +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://daopmieibx3b7"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="1_3vfd1"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_n5hpp"] [resource] -resource_name = "hero01_long_normal_attack02" +resource_name = "hero01_long_attack01" +length = 0.9 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -14,7 +15,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": [ExtResource("1_3vfd1")] +"values": [ExtResource("1_n5hpp")] } tracks/1/type = "value" tracks/1/imported = false @@ -26,7 +27,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": ["long_attack02"] +"values": ["long_attack01"] } tracks/2/type = "value" tracks/2/imported = false diff --git a/resource/skill_animation/hero01_long_normal_attack01.tres b/resource/skill_animation/hero01_long_attack02.tres similarity index 83% rename from resource/skill_animation/hero01_long_normal_attack01.tres rename to resource/skill_animation/hero01_long_attack02.tres index d431302..c89821b 100644 --- a/resource/skill_animation/hero01_long_normal_attack01.tres +++ b/resource/skill_animation/hero01_long_attack02.tres @@ -1,9 +1,10 @@ -[gd_resource type="Animation" load_steps=2 format=3 uid="uid://b28xyr8shsxad"] +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://bf6jaraltouun"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="1_kkk0x"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_c706k"] [resource] -resource_name = "hero01_long_normal_attack01" +resource_name = "hero01_long_attack02" +length = 0.9 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -14,7 +15,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": [ExtResource("1_kkk0x")] +"values": [ExtResource("1_c706k")] } tracks/1/type = "value" tracks/1/imported = false @@ -26,7 +27,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": ["long_attack01"] +"values": ["long_attack02"] } tracks/2/type = "value" tracks/2/imported = false diff --git a/resource/skill_animation/hero01_long_attack03.tres b/resource/skill_animation/hero01_long_attack03.tres new file mode 100644 index 0000000..6ee5969 --- /dev/null +++ b/resource/skill_animation/hero01_long_attack03.tres @@ -0,0 +1,43 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://c8yueqe7rjn60"] + +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_o7s2b"] + +[resource] +resource_name = "hero01_long_attack03" +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": 0, +"values": [ExtResource("1_o7s2b")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("View:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": ["long_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), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] +} diff --git a/resource/skill_animation/hero01_long_attack04.tres b/resource/skill_animation/hero01_long_attack04.tres new file mode 100644 index 0000000..cec1554 --- /dev/null +++ b/resource/skill_animation/hero01_long_attack04.tres @@ -0,0 +1,43 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://dk1o3gqhjmuvh"] + +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_ixwev"] + +[resource] +resource_name = "hero01_long_attack04" +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": 0, +"values": [ExtResource("1_ixwev")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("View:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": ["long_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": 0, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] +} diff --git a/resource/skill_animation/hero01_long_skill01.tres b/resource/skill_animation/hero01_long_skill01.tres new file mode 100644 index 0000000..e001eb0 --- /dev/null +++ b/resource/skill_animation/hero01_long_skill01.tres @@ -0,0 +1,42 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://bjnkrte7660pt"] + +[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="1_54a73"] + +[resource] +resource_name = "hero01_long_skill01" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("View:sprite_frames") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [ExtResource("1_54a73")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("View:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": ["long_skill01"] +} +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": 0, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} diff --git a/resource/skill_animation_library/animation_library.tres b/resource/skill_animation_library/animation_library.tres index c09a311..b9aa528 100644 --- a/resource/skill_animation_library/animation_library.tres +++ b/resource/skill_animation_library/animation_library.tres @@ -1,10 +1,16 @@ -[gd_resource type="AnimationLibrary" load_steps=3 format=3 uid="uid://croik07a1qko5"] +[gd_resource type="AnimationLibrary" load_steps=6 format=3 uid="uid://croik07a1qko5"] -[ext_resource type="Animation" uid="uid://bw5cffjywlaev" path="res://resource/skill_animation/hero01_long_normal_attack01.tres" id="1_jm0a8"] -[ext_resource type="Animation" uid="uid://c1onpty5sqaru" path="res://resource/skill_animation/hero01_long_normal_attack02.tres" id="2_mdnyw"] +[ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="1_nwjtl"] +[ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_klfcs"] +[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://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="4_36e6x"] +[ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"] [resource] _data = { -"hero01_long_normal_attack01": ExtResource("1_jm0a8"), -"hero01_long_normal_attack02": ExtResource("2_mdnyw") +"hero01_long_attack01": ExtResource("1_nwjtl"), +"hero01_long_attack02": ExtResource("2_klfcs"), +"hero01_long_attack03": ExtResource("3_g8q4d"), +"hero01_long_attack04": ExtResource("4_36e6x"), +"hero01_long_skill01": ExtResource("5_kt0qw") } diff --git a/scene/character/character.tscn b/scene/character/character.tscn index 0c61d36..b606144 100644 --- a/scene/character/character.tscn +++ b/scene/character/character.tscn @@ -2,9 +2,9 @@ [ext_resource type="Script" path="res://script/character/character.gd" id="1_tonbs"] [ext_resource type="Script" path="res://script/character/status.gd" id="2_txdip"] +[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_d0x76"] [ext_resource type="Script" path="res://script/character/move.gd" id="4_66r53"] [ext_resource type="Script" path="res://script/character/view.gd" id="4_vijjv"] -[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="6_8lef7"] [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"] @@ -21,14 +21,15 @@ shape = SubResource("BoxShape3D_ty8lx") [node name="Status" type="Node3D" parent="."] unique_name_in_owner = true script = ExtResource("2_txdip") +break_level = 4 [node name="View" type="AnimatedSprite3D" parent="."] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1.414, 0, 0, 0, 1, 0, 0, 0) alpha_cut = 2 texture_filter = 0 -sprite_frames = ExtResource("6_8lef7") -animation = &"long_attack02" +sprite_frames = ExtResource("3_d0x76") +animation = &"long_attack01" script = ExtResource("4_vijjv") metadata/_aseprite_wizard_config_ = { "layer": "", diff --git a/scene/character/player.tscn b/scene/character/player.tscn index 426025d..7837fb0 100644 --- a/scene/character/player.tscn +++ b/scene/character/player.tscn @@ -1,14 +1,16 @@ -[gd_scene load_steps=4 format=3 uid="uid://b85fy0wfgr4gs"] +[gd_scene load_steps=5 format=3 uid="uid://b85fy0wfgr4gs"] [ext_resource type="PackedScene" uid="uid://vnkcr04hevna" path="res://scene/character/character.tscn" id="1_bny0p"] [ext_resource type="Script" path="res://script/character/player/input.gd" id="2_qkra8"] -[ext_resource type="Resource" uid="uid://b6x3jdiqtum6" path="res://config/player_skill/hero01_long_normal_attack01.tres" id="3_b6mhs"] +[ext_resource type="Resource" uid="uid://b6x3jdiqtum6" path="res://config/player_skill/hero01_long_attack01.tres" id="3_n2lf8"] +[ext_resource type="Script" path="res://script/character/player/combo.gd" id="4_jsefx"] [node name="Character" instance=ExtResource("1_bny0p")] -[node name="View" parent="." index="2"] -animation = &"long_attack01" - [node name="Input" type="Node3D" parent="." index="5"] script = ExtResource("2_qkra8") -test_skill_cfg = ExtResource("3_b6mhs") +test_skill_cfg = ExtResource("3_n2lf8") + +[node name="Combo" type="Node3D" parent="." index="6"] +unique_name_in_owner = true +script = ExtResource("4_jsefx") diff --git a/scene/launcher.tscn b/scene/launcher.tscn index 9a47a33..a6b779a 100644 --- a/scene/launcher.tscn +++ b/scene/launcher.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://sl6cgchsyqlo"] +[gd_scene load_steps=7 format=3 uid="uid://sl6cgchsyqlo"] [ext_resource type="Script" path="res://script/manager/game_manager.gd" id="1_q2t80"] [ext_resource type="ArrayMesh" uid="uid://cap7t5iwpjpi2" path="res://resource/level/levelground0000.vox" id="1_u51ir"] [ext_resource type="Resource" uid="uid://bjvrih37ni5nx" path="res://config/character/hero01.tres" id="2_m8pa4"] [ext_resource type="Script" path="res://script/manager/character_manager.gd" id="4_oonkb"] +[ext_resource type="Script" path="res://script/editor_tool/editor_tool.gd" id="5_n3qhi"] [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_2mxa4"] data = PackedVector3Array(-6.4, 0, -6.4, -3.2, 0, -6.4, -3.2, 0, 6.4, -3.2, 0, 6.4, -6.4, 0, 6.4, -6.4, 0, -6.4, -3.2, 0, 3.2, 6.4, 0, 3.2, 6.4, 0, 6.4, 6.4, 0, 6.4, -3.2, 0, 6.4, -3.2, 0, 3.2, -3.2, 0, -3.2, 3.2, 0, -3.2, 3.2, 0, 3.2, 3.2, 0, 3.2, -3.2, 0, 3.2, -3.2, 0, -3.2, -3.2, 0, -6.4, 6.4, 0, -6.4, 6.4, 0, -3.2, 6.4, 0, -3.2, -3.2, 0, -3.2, -3.2, 0, -6.4, 3.2, 0, -3.2, 6.4, 0, -3.2, 6.4, 0, 3.2, 6.4, 0, 3.2, 3.2, 0, 3.2, 3.2, 0, -3.2, -3.2, -0.1, 6.4, -3.2, -0.1, -6.4, -6.4, -0.1, -6.4, -6.4, -0.1, -6.4, -6.4, -0.1, 6.4, -3.2, -0.1, 6.4, 6.4, -0.1, 6.4, 6.4, -0.1, 3.2, -3.2, -0.1, 3.2, -3.2, -0.1, 3.2, -3.2, -0.1, 6.4, 6.4, -0.1, 6.4, 3.2, -0.1, 3.2, 3.2, -0.1, -3.2, -3.2, -0.1, -3.2, -3.2, -0.1, -3.2, -3.2, -0.1, 3.2, 3.2, -0.1, 3.2, 6.4, -0.1, -3.2, 6.4, -0.1, -6.4, -3.2, -0.1, -6.4, -3.2, -0.1, -6.4, -3.2, -0.1, -3.2, 6.4, -0.1, -3.2, 6.4, -0.1, 3.2, 6.4, -0.1, -3.2, 3.2, -0.1, -3.2, 3.2, -0.1, -3.2, 3.2, -0.1, 3.2, 6.4, -0.1, 3.2, -6.4, 0, -6.4, -6.4, 0, 6.4, -6.4, -0.1, 6.4, -6.4, -0.1, 6.4, -6.4, -0.1, -6.4, -6.4, 0, -6.4, 6.4, 0, -6.4, 6.4, -0.1, -6.4, 6.4, -0.1, 6.4, 6.4, -0.1, 6.4, 6.4, 0, 6.4, 6.4, 0, -6.4, -6.4, -0.1, 6.4, -6.4, 0, 6.4, 6.4, 0, 6.4, 6.4, 0, 6.4, 6.4, -0.1, 6.4, -6.4, -0.1, 6.4, 6.4, 0, -6.4, -6.4, 0, -6.4, -6.4, -0.1, -6.4, -6.4, -0.1, -6.4, 6.4, -0.1, -6.4, 6.4, 0, -6.4) @@ -46,3 +47,6 @@ use_collision = true [node name="CharacterManager" type="Node3D" parent="GameManager"] unique_name_in_owner = true script = ExtResource("4_oonkb") + +[node name="EditorTool" type="Node3D" parent="."] +script = ExtResource("5_n3qhi") diff --git a/script/_global/enum.gd b/script/_global/enum.gd index 64f9265..5397991 100644 --- a/script/_global/enum.gd +++ b/script/_global/enum.gd @@ -1,4 +1,12 @@ +@tool extends Node3D enum EActionType {Pressed, Released} enum ECharacterType {Player, Monster, Bullet} +enum EStance { + Idle,Ground1,Ground2,Ground3,Ground4,Ground5,Ground6,Ground7, + AirIdle = 10,Air1,Air2,Air3, + None = 99, + Any = 100, +} +enum EBreakLevel {None, Cancel, Combo, Jump, Walk} #不可打断 取消技打断 连招打断 跳跃打断 行走打断 diff --git a/script/_global/util.gd b/script/_global/util.gd index 6c1d845..8b96bd8 100644 --- a/script/_global/util.gd +++ b/script/_global/util.gd @@ -1,5 +1,20 @@ @tool extends Node3D +var animation_library = load("res://resource/skill_animation_library/animation_library.tres") + func get_resource_name(resource:Resource) -> String: return resource.resource_path.get_file().trim_suffix('.tres') #todo 性能 + +func refresh_animation_lib(): + var dir_path = "res://resource/skill_animation" + var dir = DirAccess.open(dir_path) + for file in dir.get_files(): + var path = dir_path + "/" + file + var res = load(path) + if res is Animation: + var animation = res as Animation + var animation_name = Util.get_resource_name(animation) + animation_library.add_animation(animation_name,animation) + animation_library.animation_added.emit(animation_name) + diff --git a/script/character/move.gd b/script/character/move.gd index 2a3e2e4..a83b16f 100644 --- a/script/character/move.gd +++ b/script/character/move.gd @@ -1,18 +1,14 @@ extends Node3D class_name Move -const SPEED = 1.5 -const JUMP_VELOCITY = 3 - @onready var character = (get_owner() as Character) @onready var status = (%Status as Status) -# Get the gravity from the project settings to be synced with RigidBody nodes. + var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") func _physics_process(delta): update_on_floor() update_gravity(delta) - update_jump() update_move() character.move_and_slide() @@ -24,25 +20,26 @@ func update_on_floor(): func update_gravity(delta): if not status.is_on_floor: - character.velocity.y -= gravity * delta + character.velocity.y -= gravity * delta * status.cfg.move.gravity_scale status.speed_y = character.velocity.y -func update_jump(): - if Input.is_action_just_pressed("ui_accept") and status.is_on_floor: - character.velocity.y = JUMP_VELOCITY - status.is_jumped = true - status.trigger_jump = true func update_move(): var input_dir = status.move_dir var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() + var speed = status.cfg.move.speed if direction: - character.velocity.x = direction.x * SPEED - character.velocity.z = direction.z * SPEED + character.velocity.x = direction.x * speed + character.velocity.z = direction.z * speed else: - character.velocity.x = move_toward(character.velocity.x, 0, SPEED) - character.velocity.z = move_toward(character.velocity.z, 0, SPEED) + character.velocity.x = move_toward(character.velocity.x, 0, speed) + character.velocity.z = move_toward(character.velocity.z, 0, speed) status.speed_xz = Vector2(character.velocity.x,character.velocity.z).length() if status.is_free_turn and direction.x != 0: status.is_right = direction.x > 0 + +func jump(): + character.velocity.y = status.cfg.move.jump_velocity + status.is_jumped = true + status.trigger_jump = true diff --git a/script/character/player/combo.gd b/script/character/player/combo.gd new file mode 100644 index 0000000..c63b3b0 --- /dev/null +++ b/script/character/player/combo.gd @@ -0,0 +1,13 @@ +extends Node3D + +var skill_map = {} #stance -> skill +var input_list = [] #指令缓存 + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/script/character/player/input.gd b/script/character/player/input.gd index 37f6422..1818274 100644 --- a/script/character/player/input.gd +++ b/script/character/player/input.gd @@ -3,6 +3,7 @@ extends Node @export var test_skill_cfg:SkillCfg @onready var status = (%Status as Status) @onready var skill = (%Skill as Skill) +@onready var move = (%Move as Move) func _ready(): SignalManager.connect("input_action_pressed",on_input_action_pressed) @@ -12,9 +13,13 @@ func _ready(): func on_input_action_pressed(event:InputEvent): if event.is_action("attack_light"): skill.cast_skill(test_skill_cfg,Vector2(1,1)) + elif event.is_action("jump"): + move.jump() func on_input_action_released(event:InputEvent): pass func on_input_action_move(input_dir): - (%Status as Status).move_dir = input_dir + if !status.is_free_control: + return + status.move_dir = input_dir diff --git a/script/character/skill.gd b/script/character/skill.gd index 782fc2d..330c00d 100644 --- a/script/character/skill.gd +++ b/script/character/skill.gd @@ -2,6 +2,7 @@ extends AnimationPlayer class_name Skill @onready var view = (%View as View) +@onready var status = (%Status as Status) func _ready(): pass @@ -10,7 +11,10 @@ func _process(delta): pass func cast_skill(cfg:SkillCfg,cast_dir:Vector2): + status.is_free_control = false play("animation_library/%s"%Util.get_resource_name(cfg)) func _on_animation_finished(_anim_name): view.reset() + status.is_free_control = true + diff --git a/script/character/status.gd b/script/character/status.gd index 5c5bb12..ea03f20 100644 --- a/script/character/status.gd +++ b/script/character/status.gd @@ -6,24 +6,27 @@ class_name Status @export var owner_id : int @export_category("静态属性") -@export var cfg:CharacterCfg +@export var cfg : CharacterCfg -@export_category("运行时属性") -@export_subgroup("战斗状态") +@export_category("战斗状态") @export var hp : float #当前血量 @export var hp_max : float #血量最大值 @export var shield : float #当前护盾 @export var shield_max : float #护盾最大值 -@export_subgroup("移动状态") -@export var is_free_control : bool = true #是否可以自由控制 +@export_category("移动状态") @export var move_dir : Vector2 #移动方向 +@export var speed_xz : float #水平移动速度 +@export var speed_y : float #竖直移动速度 +@export var is_free_control : bool = true #是否可以自由控制 @export var is_on_floor : bool #是否在地面 @export var is_free_turn : bool = true #是否允许转向 @export var is_right : bool = true #是否向右 -@export var speed_xz : float #水平移动速度 -@export var speed_y : float #竖直移动速度 @export var is_jumped : bool #是否已跳跃 -@export_subgroup("动画触发器") +@export_category("技能状态") +@export var stance : Enum.EStance #技能姿态 +@export var break_level : Enum.EBreakLevel #打断等级 + +@export_category("动画触发器") @export var trigger_jump : bool #跳跃 diff --git a/script/config/character_cfg.gd b/script/config/character_cfg.gd index 9dae5dc..0cbba3a 100644 --- a/script/config/character_cfg.gd +++ b/script/config/character_cfg.gd @@ -11,6 +11,9 @@ class_name CharacterCfg @export var sprite_harf_height : int @export var sprite_width : int +#移动 +@export var move : CharacterMoveCfg + #战斗信息 @export var hp_max : float @export var shield_max : float diff --git a/script/config/character_move_cfg.gd b/script/config/character_move_cfg.gd new file mode 100644 index 0000000..ab3b353 --- /dev/null +++ b/script/config/character_move_cfg.gd @@ -0,0 +1,7 @@ +extends Resource + +class_name CharacterMoveCfg + +@export var speed : float +@export var gravity_scale : float +@export var jump_velocity : float diff --git a/script/config/player_skill_cfg.gd b/script/config/player_skill_cfg.gd index fd788f5..be1fc6c 100644 --- a/script/config/player_skill_cfg.gd +++ b/script/config/player_skill_cfg.gd @@ -3,4 +3,6 @@ extends SkillCfg class_name PlayerSkillCfg -@export var weapon : Weapon +@export var weapon : WeaponCfg +@export var stance_from : Enum.EStance +@export var stance_to : Enum.EStance diff --git a/script/config/skill_cfg.gd b/script/config/skill_cfg.gd index c0a8e90..f546177 100644 --- a/script/config/skill_cfg.gd +++ b/script/config/skill_cfg.gd @@ -6,8 +6,6 @@ class_name SkillCfg @export var name : String @export var skill_animation : Animation -var animation_library = load("res://resource/skill_animation_library/animation_library.tres") - var _has_animation : bool @export var has_animation : bool : get: @@ -58,24 +56,13 @@ func create_animation(res_name,path) -> bool: animation.track_set_path(track_frame,"View:frame") var animation_speed = 0.1 var animation_frame_count = sprite_frams.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) ResourceSaver.save(animation,path) - refresh_animation_lib() + Util.refresh_animation_lib() return true -func refresh_animation_lib(): - var dir_path = "res://resource/skill_animation" - var dir = DirAccess.open(dir_path) - for file in dir.get_files(): - var path = dir_path + "/" + file - var res = load(path) - if res is Animation: - var animation = res as Animation - var animation_name = Util.get_resource_name(animation) - animation_library.add_animation(animation_name,animation) - animation_library.animation_added.emit(animation_name) - diff --git a/script/config/weapon_cfg.gd b/script/config/weapon_cfg.gd index e63a106..3d6a62d 100644 --- a/script/config/weapon_cfg.gd +++ b/script/config/weapon_cfg.gd @@ -1,5 +1,5 @@ extends Resource -class_name Weapon +class_name WeaponCfg @export var name : String diff --git a/script/editor_tool/editor_tool.gd b/script/editor_tool/editor_tool.gd new file mode 100644 index 0000000..d2a365b --- /dev/null +++ b/script/editor_tool/editor_tool.gd @@ -0,0 +1,9 @@ +@tool +extends Node3D + +@export var refresh_animation_lib : bool : + get: + return false + set(value): + Util.refresh_animation_lib() +