技能轮盘

master
chendian 8 months ago
parent 80057356e7
commit 8b28016aec

@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://dtxe3pgt6xnom"]
[ext_resource type="Script" uid="uid://coj1fx00rq7ad" path="res://script/config/core_cfg.gd" id="1_8tyeo"]
[resource]
script = ExtResource("1_8tyeo")
name = "飞刀"
type = 0

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://djwu1qw3irbmj"]
[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="2_glcvn"]
[ext_resource type="Script" uid="uid://coj1fx00rq7ad" path="res://script/config/core_cfg.gd" id="2_glcvn"]
[resource]
script = ExtResource("2_glcvn")
name = ""
type = 2
name = "幽冥前斩"
type = 0

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://dewpurp65pxqe"]
[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_gjabn"]
[ext_resource type="Script" uid="uid://coj1fx00rq7ad" path="res://script/config/core_cfg.gd" id="1_gjabn"]
[resource]
script = ExtResource("1_gjabn")
name = ""
type = 2
type = 0

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://duhgn52hssk87"]
[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_e8a6y"]
[ext_resource type="Script" uid="uid://coj1fx00rq7ad" path="res://script/config/core_cfg.gd" id="1_e8a6y"]
[resource]
script = ExtResource("1_e8a6y")
name = ""
type = 2
type = 0

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="CoreCfg" load_steps=2 format=3 uid="uid://b63634fi2nms7"]
[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_grj3e"]
[ext_resource type="Script" uid="uid://coj1fx00rq7ad" path="res://script/config/core_cfg.gd" id="1_grj3e"]
[resource]
script = ExtResource("1_grj3e")
name = ""
type = 2
type = 0

@ -0,0 +1,26 @@
[gd_resource type="Resource" script_class="SkillCfg" load_steps=3 format=3 uid="uid://cu7gfnnd8tnr5"]
[ext_resource type="Script" uid="uid://ch4gg7uuu2e2t" path="res://script/config/skill_cfg.gd" id="1_lqrjn"]
[ext_resource type="Resource" uid="uid://d3mafsovw1mko" path="res://config/character/bullet_hero01_soul_hit01.tres" id="2_kbhp2"]
[resource]
script = ExtResource("1_lqrjn")
name = ""
sub_character = ExtResource("2_kbhp2")
sub_character_count = 5
stance_from = 102
stance_to = 10
break_level = 3
is_charging = false
attack1_with_stop = false
attack2_with_stop = false
mp_cost = 0
mp_sub_cost = false
free_lock = false
ignore_push = false
is_lock_x = true
is_lock_x_move = false
range = 0.0
warn_type = 0
animation_name = "none"
metadata/_custom_type_script = "uid://ch4gg7uuu2e2t"

@ -7,6 +7,7 @@
[resource]
script = ExtResource("1_2lha7")
name = ""
sub_character_count = 0
skill_animation = ExtResource("2_lwm2b")
stance_from = 102
stance_to = 10

@ -2,25 +2,30 @@
[ext_resource type="Resource" uid="uid://bv4uoey1liqoq" path="res://config/attack/sharp_heavy_hit_blow.tres" id="1_idhfy"]
[ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_rmdjw"]
[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="3_qlpem"]
[ext_resource type="Script" uid="uid://ch4gg7uuu2e2t" path="res://script/config/skill_cfg.gd" id="3_qlpem"]
[ext_resource type="Animation" uid="uid://dyyt3nsvoye62" path="res://resource/skill_animation/monster03_slash01.tres" id="4_xr54j"]
[ext_resource type="SpriteFrames" uid="uid://bac4ype7w4wr7" path="res://resource/animation/character/monster03_skill.aseprite" id="5_30t6c"]
[resource]
script = ExtResource("3_qlpem")
name = ""
sub_character_count = 0
skill_animation = ExtResource("4_xr54j")
range = 1.0
free_lock = false
ignore_push = false
attack1 = ExtResource("1_idhfy")
attack1_box = ExtResource("2_rmdjw")
stance_from = 100
stance_to = 0
break_level = 3
is_charging = false
attack1 = ExtResource("1_idhfy")
attack1_box = ExtResource("2_rmdjw")
attack1_with_stop = false
attack2_with_stop = false
mp_cost = 0
mp_sub_cost = false
free_lock = false
ignore_push = false
is_lock_x = true
is_lock_x_move = false
range = 1.0
warn_type = 1
refresh_animation = false
sprite_frames = ExtResource("5_30t6c")
animation_name = "skill01"

@ -4,26 +4,32 @@
[ext_resource type="Resource" uid="uid://bv4uoey1liqoq" path="res://config/attack/sharp_heavy_hit_blow.tres" id="1_txo8b"]
[ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_6lahv"]
[ext_resource type="Resource" uid="uid://diedb7vw7eyxp" path="res://config/attack_box/box_mid.tres" id="2_tp3t7"]
[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="3_oagn5"]
[ext_resource type="Script" uid="uid://ch4gg7uuu2e2t" path="res://script/config/skill_cfg.gd" id="3_oagn5"]
[ext_resource type="SpriteFrames" uid="uid://bac4ype7w4wr7" path="res://resource/animation/character/monster03_skill.aseprite" id="5_jfqys"]
[ext_resource type="Animation" uid="uid://2oxeq83bpofb" path="res://resource/skill_animation/monster03_slash02.tres" id="6_yqy3u"]
[resource]
script = ExtResource("3_oagn5")
name = ""
sub_character_count = 0
skill_animation = ExtResource("6_yqy3u")
range = 2.0
free_lock = false
ignore_push = true
attack1 = ExtResource("1_sp2tj")
attack1_box = ExtResource("2_6lahv")
attack2 = ExtResource("1_txo8b")
attack2_box = ExtResource("2_tp3t7")
stance_from = 100
stance_to = 0
break_level = 3
is_charging = false
attack1 = ExtResource("1_sp2tj")
attack1_box = ExtResource("2_6lahv")
attack1_with_stop = false
attack2 = ExtResource("1_txo8b")
attack2_box = ExtResource("2_tp3t7")
attack2_with_stop = false
mp_cost = 1
refresh_animation = false
mp_sub_cost = false
free_lock = false
ignore_push = true
is_lock_x = true
is_lock_x_move = false
range = 2.0
warn_type = 0
sprite_frames = ExtResource("5_jfqys")
animation_name = "skill02"

@ -2,24 +2,30 @@
[ext_resource type="Resource" uid="uid://qmivx7ntfrki" path="res://config/attack/sharp_mid_hit.tres" id="1_iexxu"]
[ext_resource type="Resource" uid="uid://hg1w2k1u3wn" path="res://config/attack_box/circle_large.tres" id="2_r82bc"]
[ext_resource type="Script" path="res://script/config/skill_cfg.gd" id="3_n02wr"]
[ext_resource type="Script" uid="uid://ch4gg7uuu2e2t" path="res://script/config/skill_cfg.gd" id="3_n02wr"]
[ext_resource type="Animation" uid="uid://co8bivpp1fm6g" path="res://resource/skill_animation/monster03_slash03.tres" id="4_cip05"]
[ext_resource type="SpriteFrames" uid="uid://bac4ype7w4wr7" path="res://resource/animation/character/monster03_skill.aseprite" id="5_0ny0c"]
[resource]
script = ExtResource("3_n02wr")
name = ""
sub_character_count = 0
skill_animation = ExtResource("4_cip05")
range = 4.0
free_lock = false
ignore_push = false
attack1 = ExtResource("1_iexxu")
attack1_box = ExtResource("2_r82bc")
stance_from = 100
stance_to = 0
break_level = 3
is_charging = false
attack1 = ExtResource("1_iexxu")
attack1_box = ExtResource("2_r82bc")
attack1_with_stop = false
attack2_with_stop = false
mp_cost = 1
refresh_animation = false
mp_sub_cost = false
free_lock = false
ignore_push = false
is_lock_x = true
is_lock_x_move = false
range = 4.0
warn_type = 0
sprite_frames = ExtResource("5_0ny0c")
animation_name = "skill03"

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"]
[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_blorc"]
[ext_resource type="Script" uid="uid://dgwtu2wj5033u" 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"]
@ -8,19 +8,21 @@
script = ExtResource("1_blorc")
action = "flash"
name = ""
sub_character_count = 0
skill_animation = ExtResource("2_sx5x4")
range = 0.0
free_lock = true
ignore_push = true
stance_from = 101
stance_to = 10
break_level = 0
is_charging = false
attack1_with_stop = false
attack2_with_stop = false
mp_cost = 0
mp_sub_cost = false
warn_type = 0
with_stop = false
free_lock = true
ignore_push = true
is_lock_x = false
refresh_animation = false
is_lock_x_move = false
range = 0.0
warn_type = 0
sprite_frames = ExtResource("3_ciqr7")
animation_name = "basic_air_flash"

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="SkillWeaponCfg" load_steps=4 format=3 uid="uid://cyqiiar75vf87"]
[ext_resource type="Script" path="res://script/config/skill_weapon_cfg.gd" id="1_raqfe"]
[ext_resource type="Script" uid="uid://dgwtu2wj5033u" 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"]
@ -8,19 +8,21 @@
script = ExtResource("1_raqfe")
action = "flash"
name = ""
sub_character_count = 0
skill_animation = ExtResource("2_31kka")
range = 0.0
free_lock = true
ignore_push = true
stance_from = 100
stance_to = 0
break_level = 0
is_charging = false
attack1_with_stop = false
attack2_with_stop = false
mp_cost = 0
mp_sub_cost = false
warn_type = 0
with_stop = false
free_lock = true
ignore_push = true
is_lock_x = false
refresh_animation = false
is_lock_x_move = false
range = 0.0
warn_type = 0
sprite_frames = ExtResource("3_i6jjr")
animation_name = "basic_flash"

@ -13,6 +13,7 @@ script = ExtResource("2_mje6b")
weapon = ExtResource("5_70pp4")
action = "attack_heavy"
name = ""
sub_character_count = 0
skill_animation = ExtResource("3_q461t")
stance_from = 10
stance_to = 0

@ -11,6 +11,7 @@ script = ExtResource("2_ym7q1")
weapon = ExtResource("5_en30r")
action = "attack_light"
name = ""
sub_character_count = 0
skill_animation = ExtResource("3_dbjmb")
stance_from = 4
stance_to = 5

@ -11,6 +11,7 @@ script = ExtResource("3_6wryu")
weapon = ExtResource("6_aemq5")
action = "attack_heavy"
name = ""
sub_character_count = 0
skill_animation = ExtResource("4_c7ye6")
stance_from = 3
stance_to = 30

@ -11,6 +11,7 @@ script = ExtResource("5_j7ual")
weapon = ExtResource("7_cmht3")
action = "attack_light"
name = ""
sub_character_count = 0
skill_animation = ExtResource("6_le53b")
stance_from = 53
stance_to = 10

@ -11,6 +11,7 @@ script = ExtResource("2_0x7hh")
weapon = ExtResource("5_u3vas")
action = "attack_light"
name = ""
sub_character_count = 0
skill_animation = ExtResource("3_1erk8")
stance_from = 12
stance_to = 3

@ -11,6 +11,7 @@ script = ExtResource("3_to21l")
weapon = ExtResource("6_vj7l0")
action = "attack_heavy"
name = ""
sub_character_count = 0
skill_animation = ExtResource("4_u7aq7")
stance_from = 12
stance_to = 10

@ -11,6 +11,7 @@ script = ExtResource("3_tbh7t")
weapon = ExtResource("6_3b28o")
action = "none"
name = ""
sub_character_count = 0
skill_animation = ExtResource("4_2k8jp")
stance_from = 99
stance_to = 99

@ -13,6 +13,7 @@ weapon = ExtResource("6_cys3s")
action = "attack_heavy"
name = ""
sub_character = ExtResource("4_hrq33")
sub_character_count = 0
skill_animation = ExtResource("2_jcwvc")
stance_from = 30
stance_to = 99

@ -9,6 +9,7 @@ script = ExtResource("3_0dcj8")
weapon = ExtResource("6_7qlca")
action = "attack_heavy"
name = ""
sub_character_count = 0
skill_animation = ExtResource("2_j0c0j")
stance_from = 1
stance_to = 30

@ -13,6 +13,7 @@ weapon = ExtResource("6_5n6sn")
action = "attack_light"
name = ""
sub_character = ExtResource("6_cub6b")
sub_character_count = 0
skill_animation = ExtResource("4_67ngl")
stance_from = 30
stance_to = 30

@ -156,7 +156,7 @@ jump={
flash={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
]
}
lock={
@ -190,7 +190,8 @@ status={
}
switch={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null)
]
}
interact={

@ -12,7 +12,7 @@ background_mode = 1
sky = SubResource("Sky_hmsea")
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
ambient_light_energy = 0.1
ambient_light_energy = 0.5
tonemap_white = 2.39
ssil_enabled = true
ssil_intensity = 0.4

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://0put8pscss6d"
path="res://.godot/imported/skill_name.png-15df19a8efce6cb164432127956234b7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/ui/hud/skill_name.png"
dest_files=["res://.godot/imported/skill_name.png-15df19a8efce6cb164432127956234b7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=0
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=false
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bu2p3a8yq81u5"
path="res://.godot/imported/input_map.png-8f073892bafd2b49ac15ed7f5abb24e6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/ui/icon/input/input_map.png"
dest_files=["res://.godot/imported/input_map.png-8f073892bafd2b49ac15ed7f5abb24e6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=0
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=false
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

@ -4,7 +4,7 @@
[ext_resource type="Script" uid="uid://cms637d0jt6sk" path="res://script/character/hitbox.gd" id="2_6xf87"]
[ext_resource type="Script" uid="uid://bfi4gneebe3oq" path="res://script/character/status.gd" id="2_txdip"]
[ext_resource type="Script" uid="uid://cnaqs44siwa45" path="res://script/character/move.gd" id="4_66r53"]
[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="4_sox5o"]
[ext_resource type="SpriteFrames" uid="uid://jpxh0jr8wp8g" path="res://resource/animation/character/hero01_basic.aseprite" id="4_sox5o"]
[ext_resource type="Script" uid="uid://c247mf44qb3uf" path="res://script/character/view.gd" id="4_vijjv"]
[ext_resource type="Script" uid="uid://c24is3uqqcmcn" 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"]
@ -137,7 +137,7 @@ gi_mode = 0
pixel_size = 0.02
alpha_cut = 1
sprite_frames = ExtResource("4_sox5o")
animation = &"long_skill01"
animation = &"basic_air_flash"
script = ExtResource("4_vijjv")
[node name="Move" type="Node3D" parent="."]

@ -14,7 +14,7 @@ point_count = 3
[node name="OmniLight3D" type="OmniLight3D" parent="View/SoulLight" index="0"]
light_color = Color(0.768627, 1, 1, 1)
light_energy = 0.05
light_energy = 0.02
omni_range = 2.0
[node name="Throw" parent="." index="10"]

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=3 uid="uid://126wph4owvoy"]
[gd_scene load_steps=29 format=3 uid="uid://126wph4owvoy"]
[ext_resource type="Script" uid="uid://bj1syq1cnpch6" path="res://script/ui/screen.gd" id="1_davcv"]
[ext_resource type="Script" uid="uid://noxi8tkiodot" path="res://script/ui/hud/hud_page.gd" id="1_t7dgf"]
@ -20,6 +20,7 @@
[ext_resource type="Texture2D" uid="uid://d1p6frj6673py" path="res://resource/ui/hud/boss_status_hp.png" id="10_o72w7"]
[ext_resource type="PackedScene" uid="uid://dfjudjr7aq205" path="res://scene/ui/item/skill_item.tscn" id="12_gotas"]
[ext_resource type="Script" uid="uid://7x30wq84k3b3" path="res://script/ui/hud/core_item.gd" id="12_s7xys"]
[ext_resource type="PackedScene" uid="uid://cvx8f4p2kkp8c" path="res://scene/ui/item/input_item.tscn" id="18_1ymc1"]
[sub_resource type="Animation" id="Animation_pfl0h"]
length = 0.001
@ -61,7 +62,7 @@ _data = {
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b5bdl"]
shader = ExtResource("9_lv4gd")
shader_parameter/in_color = null
shader_parameter/in_color = Color(0, 0, 0, 1)
shader_parameter/position = 1.0
shader_parameter/size = Vector2(32, 32)
shader_parameter/screen_size = Vector2(640, 360)
@ -256,9 +257,9 @@ script = ExtResource("7_3g1k3")
[node name="CoreItem" type="Control" parent="HudPage"]
anchors_preset = 0
offset_left = 560.0
offset_top = 304.0
offset_top = 300.0
offset_right = 592.0
offset_bottom = 336.0
offset_bottom = 332.0
pivot_offset = Vector2(16, 16)
script = ExtResource("12_s7xys")
@ -287,6 +288,7 @@ offset_left = -20.0
offset_top = -4.0
offset_right = 12.0
offset_bottom = 28.0
is_right = true
[node name="Right" parent="HudPage/CoreItem/CoreItemFree" instance=ExtResource("12_gotas")]
layout_mode = 1
@ -294,6 +296,7 @@ offset_left = 4.0
offset_top = -20.0
offset_right = 36.0
offset_bottom = 12.0
is_right = true
[node name="CoreItemLock" type="Control" parent="HudPage/CoreItem"]
visible = false
@ -321,6 +324,7 @@ offset_left = -20.0
offset_top = -4.0
offset_right = 12.0
offset_bottom = 28.0
is_right = true
[node name="Right" parent="HudPage/CoreItem/CoreItemLock" instance=ExtResource("12_gotas")]
layout_mode = 1
@ -328,6 +332,25 @@ offset_left = 4.0
offset_top = -20.0
offset_right = 36.0
offset_bottom = 12.0
is_right = true
[node name="CoreItemInput" type="Control" parent="HudPage/CoreItem"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 16.0
offset_top = 16.0
offset_right = -16.0
offset_bottom = -16.0
[node name="Up" parent="HudPage/CoreItem/CoreItemInput" instance=ExtResource("18_1ymc1")]
[node name="Left" parent="HudPage/CoreItem/CoreItemInput" instance=ExtResource("18_1ymc1")]
[node name="Down" parent="HudPage/CoreItem/CoreItemInput" instance=ExtResource("18_1ymc1")]
[node name="Right" parent="HudPage/CoreItem/CoreItemInput" instance=ExtResource("18_1ymc1")]
[node name="HeadBarPage" type="Control" parent="."]
layout_mode = 3
@ -337,6 +360,7 @@ offset_bottom = 40.0
script = ExtResource("3_6chl0")
[node name="LoadingPage" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 0
offset_right = 40.0

@ -0,0 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://cvx8f4p2kkp8c"]
[ext_resource type="Texture2D" uid="uid://bu2p3a8yq81u5" path="res://resource/ui/icon/input/input_map.png" id="1_qs2yt"]
[ext_resource type="Script" uid="uid://dbpn6lf5gryog" path="res://script/ui/hud/input_item.gd" id="2_xmd72"]
[node name="InputItem" type="Sprite2D"]
modulate = Color(1, 1, 1, 0)
texture = ExtResource("1_qs2yt")
hframes = 12
vframes = 7
script = ExtResource("2_xmd72")
metadata/_custom_type_script = "uid://dbpn6lf5gryog"

@ -1,10 +1,11 @@
[gd_scene load_steps=7 format=3 uid="uid://dfjudjr7aq205"]
[gd_scene load_steps=8 format=3 uid="uid://dfjudjr7aq205"]
[ext_resource type="Script" path="res://script/ui/hud/core_item_sub.gd" id="1_bnq6k"]
[ext_resource type="Script" uid="uid://bdn2thgpe341e" path="res://script/ui/hud/core_item_sub.gd" id="1_bnq6k"]
[ext_resource type="Texture2D" uid="uid://dcld8q2hgpwji" path="res://resource/ui/hud/skill_slot.png" id="2_bl1f4"]
[ext_resource type="Shader" path="res://render/shader/ui_skill_icon.gdshader" id="3_lbcyi"]
[ext_resource type="Shader" uid="uid://ir3mx1s7b5t2" path="res://render/shader/ui_skill_icon.gdshader" id="3_lbcyi"]
[ext_resource type="Texture2D" uid="uid://clh4rxsuj5hh4" path="res://resource/ui/hud/skill_icon_mask.png" id="4_ccxg7"]
[ext_resource type="Texture2D" uid="uid://1s8mmat4sj4j" path="res://resource/ui/icon/skill/default.png" id="5_p7y4q"]
[ext_resource type="Texture2D" uid="uid://0put8pscss6d" path="res://resource/ui/hud/skill_name.png" id="6_6bbkq"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vtxiw"]
shader = ExtResource("3_lbcyi")
@ -26,6 +27,93 @@ grow_vertical = 2
pivot_offset = Vector2(16, 16)
script = ExtResource("1_bnq6k")
[node name="CoreNameRight" type="Control" parent="."]
visible = false
anchors_preset = 0
offset_top = -1.0
offset_right = 40.0
offset_bottom = 39.0
[node name="CoreNamePanelRight" type="TextureRect" parent="CoreNameRight"]
modulate = Color(1, 1, 1, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -4.0
offset_top = -4.0
offset_right = 92.0
offset_bottom = 12.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_6bbkq")
[node name="CoreNameLabelRight" type="Label" parent="CoreNameRight"]
modulate = Color(1, 1, 1, 0)
layout_mode = 0
offset_left = 33.0
offset_top = 18.0
offset_right = 105.0
offset_bottom = 32.0
theme_override_font_sizes/font_size = 8
text = "技能名"
clip_text = true
[node name="CoreMpCostRight" type="HBoxContainer" parent="CoreNameRight"]
modulate = Color(1, 1, 1, 0)
layout_mode = 0
offset_left = 34.0
offset_top = 11.0
offset_right = 74.0
offset_bottom = 18.0
theme_override_constants/separation = -5
[node name="CoreNameLeft" type="Control" parent="."]
anchors_preset = 0
offset_top = -1.0
offset_right = 40.0
offset_bottom = 39.0
[node name="CoreNamePanelLeft" type="TextureRect" parent="CoreNameLeft"]
modulate = Color(1, 1, 1, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -100.0
offset_top = -4.0
offset_right = -4.0
offset_bottom = 12.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_6bbkq")
flip_h = true
[node name="CoreNameLabelLeft" type="Label" parent="CoreNameLeft"]
modulate = Color(1, 1, 1, 0)
layout_mode = 0
offset_left = -72.0
offset_top = 18.0
offset_bottom = 32.0
theme_override_font_sizes/font_size = 8
text = "技能名"
horizontal_alignment = 2
clip_text = true
[node name="CoreMpCostLeft" type="HBoxContainer" parent="CoreNameLeft"]
modulate = Color(1, 1, 1, 0)
layout_mode = 0
offset_left = -39.0
offset_top = 11.0
offset_right = 1.0
offset_bottom = 18.0
theme_override_constants/separation = -5
alignment = 2
[node name="CoreSlot" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8

@ -30,6 +30,7 @@ func update_skill() -> void:
return
var skill_cfg: SkillCfg = skill_order.skill_cfg
if skill_cfg.sub_character and skill_cfg.sub_character.type == Enum.ECharacterType.Bullet:
for i in range(skill_cfg.sub_character_count):
var bullet_order: Status.BulletOrder = Status.BulletOrder.new()
bullet_order.bullet_cfg = skill_cfg.sub_character
bullet_order.cast_dir = skill_order.cast_dir

@ -25,6 +25,7 @@ func _ready():
add_weapon(load("res://config/weapon/fist.tres") as WeaponCfg)
core.set_active_core(0, load("res://config/core/hero01_soul_slash.tres") as CoreCfg)
core.set_active_core(4, load("res://config/core/hero01_soul_hit01.tres") as CoreCfg)
func _process(delta):

@ -2,10 +2,10 @@ extends Cfg
class_name CoreCfg
@export var name: String
@export var type: Enum.ECoreType
@export var type: Enum.ECoreType = Enum.ECoreType.Active
var icon: Texture2D
var skill_cfg: Dictionary = {}
var skill_cfg_dict: Dictionary = {}
func get_icon() -> Texture2D:
@ -20,17 +20,23 @@ func get_icon()->Texture2D:
func get_skill_cfg(index: int) -> SkillCfg:
if index in skill_cfg:
return skill_cfg[index]
if index in skill_cfg_dict:
return skill_cfg_dict[index]
var res_name: String = get_res_name()
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
skill_cfg_dict[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]
skill_cfg_dict[index] = load(path_default) as SkillCfg
if index in skill_cfg_dict:
return skill_cfg_dict[index]
print("无效的技能配置: %s_%d" % [res_name, index])
return null
func get_mp_cost() -> int:
var skill_cfg: SkillCfg = get_skill_cfg(0) # todo
if skill_cfg:
return skill_cfg.mp_cost
return 0

@ -4,6 +4,7 @@ class_name SkillCfg
@export var name: String
@export var sub_character: CharacterCfg
@export var sub_character_count: int
@export var skill_animation: Animation
@export_tool_button("刷新技能动画", "Callable")
var refresh_animation: Callable = check_animation

@ -1,29 +1,80 @@
@tool
extends Control
@onready var core_item_list: Array[Variant] = [
@onready var core_item_list: Array[CoreItemSub] = [
$CoreItemFree/Up, $CoreItemFree/Left, $CoreItemFree/Down, $CoreItemFree/Right,
$CoreItemLock/Up, $CoreItemLock/Left, $CoreItemLock/Down, $CoreItemLock/Right,
]
@onready var core_item_input_list: Array[InputItem] = [
$CoreItemInput/Up, $CoreItemInput/Left, $CoreItemInput/Down, $CoreItemInput/Right,
]
@onready var core_item_free: Control = $CoreItemFree
@onready var core_item_lock: Control = $CoreItemLock
@export var is_switch: bool:
set(value):
is_switch = value
is_switch_animation = true
@export var is_lock: bool:
set(value):
is_lock = value
core_item_free.visible = not is_lock
core_item_lock.visible = is_lock
@export var switch_animation_time_max: float = 0.1
var switch_animation_time: float = 0.0
var is_switch_animation: bool
@export var switch_center_pos1 = Vector2(560, 300)
@export var switch_center_pos2 = Vector2(480, 280)
var switch_item_pos1 = [
Vector2(0, -16), Vector2(-24, 0), Vector2(0, 16), Vector2(24, 0),
Vector2(0, -16), Vector2(-24, 0), Vector2(0, 16), Vector2(24, 0),
]
var switch_item_pos2 = [
Vector2(0, -32), Vector2(-32, 0), Vector2(0, 32), Vector2(32, 0),
Vector2(0, -32), Vector2(-32, 0), Vector2(0, 32), Vector2(32, 0),
]
var core_item_input_pos1 = Vector2(0, 0)
var core_item_input_pos2 = [
Vector2(0, -16), Vector2(-16, 0), Vector2(0, 16), Vector2(16, 0),
]
func _process(delta):
if not is_switch_animation:
return
switch_animation_time += delta if is_switch else -delta
switch_animation_time = max(0, min(switch_animation_time, switch_animation_time_max))
var rate = switch_animation_time / switch_animation_time_max
animation_lerp(rate)
if switch_animation_time == switch_animation_time_max or switch_animation_time == 0:
is_switch_animation = false
func on_core_active_list_changed(core_list: Array[CoreCfg]):
for i in range(len(core_list)):
var cfg: CoreCfg = core_list[i]
var item: CoreItemSub = core_item_list[i] as CoreItemSub
if cfg:
item.set_icon(cfg.get_icon())
else:
item.set_icon(null)
item.set_info(cfg)
func on_is_switch_changed(value: bool):
visible = value
is_switch = value
func on_is_lock_changed(isLock: bool):
core_item_free.visible = !isLock
core_item_lock.visible = isLock
func on_is_lock_changed(value: bool):
is_lock = value
func animation_lerp(rate: float):
position = lerp(switch_center_pos1, switch_center_pos2, rate)
for i in len(core_item_list):
var item: CoreItemSub = core_item_list[i] as CoreItemSub
item.position = lerp(switch_item_pos1[i], switch_item_pos2[i], rate)
item.detail_rate = rate
for i in len(core_item_input_list):
var item: InputItem = core_item_input_list[i] as InputItem
item.position = lerp(core_item_input_pos1, core_item_input_pos2[i], rate)
item.detail_rate = rate

@ -1,13 +1,63 @@
@tool
extends Control
class_name CoreItemSub
@onready var mp_scene: PackedScene = preload("res://scene/ui/item/mp_item.tscn")
@export var is_right: bool:
set(value):
is_right = value
$CoreNameLeft.visible = not value
$CoreNameRight.visible = value
@export var detail_rate: float:
set(value):
detail_rate = value
var panel_left = $CoreNameLeft/CoreNamePanelLeft as TextureRect
var panel_right = $CoreNameRight/CoreNamePanelRight as TextureRect
var label_left = $CoreNameLeft/CoreNameLabelLeft as Label
var label_right = $CoreNameRight/CoreNameLabelRight as Label
var mp_list_left = $CoreNameLeft/CoreMpCostLeft as HBoxContainer
var mp_list_right = $CoreNameRight/CoreMpCostRight as HBoxContainer
panel_left.modulate.a = value
panel_right.modulate.a = value
label_left.modulate.a = value
label_right.modulate.a = value
mp_list_left.modulate.a = value
mp_list_right.modulate.a = value
@onready var icon: TextureRect = $CoreIcon as TextureRect
@onready var slot: TextureRect = $CoreSlot as TextureRect
@onready var icon_empty: Texture2D = load("res://resource/ui/icon/core/empty.png") as Texture2D
func set_icon(value: Texture2D):
if value:
icon.texture = value
else:
func set_info(cfg: CoreCfg):
var label_left = $CoreNameLeft/CoreNameLabelLeft as Label
var label_right = $CoreNameRight/CoreNameLabelRight as Label
var mp_list_left = $CoreNameLeft/CoreMpCostLeft as HBoxContainer
var mp_list_right = $CoreNameRight/CoreMpCostRight as HBoxContainer
if not cfg:
icon.texture = icon_empty
label_left.text = "-"
label_right.text = "-"
set_mp_cost(mp_list_left, 0)
set_mp_cost(mp_list_right, 0)
else:
icon.texture = cfg.get_icon()
label_left.text = cfg.name
label_right.text = cfg.name
set_mp_cost(mp_list_left, cfg.get_mp_cost())
set_mp_cost(mp_list_right, cfg.get_mp_cost())
func set_mp_cost(mp_list: HBoxContainer, value: int):
for child in mp_list.get_children():
child.queue_free()
if value == 0:
var mp_item: MpItemSub = mp_scene.instantiate() as MpItemSub
mp_list.add_child(mp_item)
mp_item.set_active(false)
else:
for i in range(value):
var mp_item: MpItemSub = mp_scene.instantiate() as MpItemSub
mp_list.add_child(mp_item)

@ -0,0 +1,9 @@
@tool
extends Sprite2D
class_name InputItem
@export var detail_rate: float:
set(value):
detail_rate = value
modulate.a = value

@ -0,0 +1 @@
uid://dbpn6lf5gryog
Loading…
Cancel
Save