位移技能释放优化

master
chendian 2 years ago
parent 198a414342
commit d50b44a096

@ -3,8 +3,9 @@
[ext_resource type="Script" path="res://script/config/attack_box_cfg.gd" id="1_661yg"] [ext_resource type="Script" path="res://script/config/attack_box_cfg.gd" id="1_661yg"]
[sub_resource type="BoxShape3D" id="BoxShape3D_87jhu"] [sub_resource type="BoxShape3D" id="BoxShape3D_87jhu"]
size = Vector3(2, 2, 2)
[resource] [resource]
script = ExtResource("1_661yg") script = ExtResource("1_661yg")
shape = SubResource("BoxShape3D_87jhu") shape = SubResource("BoxShape3D_87jhu")
offset = Vector2(0.5, 0.5) offset = Vector2(1, 1)

@ -3,8 +3,9 @@
[ext_resource type="Script" path="res://script/config/attack_box_cfg.gd" id="1_d4mqn"] [ext_resource type="Script" path="res://script/config/attack_box_cfg.gd" id="1_d4mqn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_87jhu"] [sub_resource type="BoxShape3D" id="BoxShape3D_87jhu"]
size = Vector3(1.6, 1.2, 1.2)
[resource] [resource]
script = ExtResource("1_d4mqn") script = ExtResource("1_d4mqn")
shape = SubResource("BoxShape3D_87jhu") shape = SubResource("BoxShape3D_87jhu")
offset = Vector2(0.5, 0.5) offset = Vector2(0.8, 0.6)

@ -1,7 +1,8 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://rib7hj11oscr"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://rib7hj11oscr"]
[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/sharp_normal_hit.tres" id="1_mxlqc"] [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/player_skill_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="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"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_q0bln"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_s1k6m"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_s1k6m"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("3_3pp8a") skill_animation = ExtResource("3_3pp8a")
free_lock = false free_lock = false
attack1 = ExtResource("1_mxlqc") attack1 = ExtResource("1_mxlqc")
attack1_box = ExtResource("2_nk4i8")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("4_q0bln") sprite_frames = ExtResource("4_q0bln")
animation_name = "long_air_attack01" animation_name = "long_air_attack01"

@ -1,7 +1,8 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://c675lckg7ly25"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://c675lckg7ly25"]
[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/sharp_normal_hit.tres" id="1_qfkyy"] [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/player_skill_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="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"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_ahm2t"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_nkec4"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_nkec4"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("3_76yga") skill_animation = ExtResource("3_76yga")
free_lock = false free_lock = false
attack1 = ExtResource("1_qfkyy") attack1 = ExtResource("1_qfkyy")
attack1_box = ExtResource("2_xxivk")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("4_ahm2t") sprite_frames = ExtResource("4_ahm2t")
animation_name = "long_air_attack02" animation_name = "long_air_attack02"

@ -1,7 +1,8 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://b705py5rht5i3"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://b705py5rht5i3"]
[ext_resource type="Resource" uid="uid://dj7tchh0202t2" path="res://config/attack/sharp_mid_hit_down.tres" id="1_rccpt"] [ext_resource type="Resource" uid="uid://dj7tchh0202t2" path="res://config/attack/sharp_mid_hit_down.tres" id="1_rccpt"]
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_0x7hh"] [ext_resource type="Script" path="res://script/config/player_skill_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="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"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="4_wrd60"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_u3vas"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_u3vas"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("3_1erk8") skill_animation = ExtResource("3_1erk8")
free_lock = false free_lock = false
attack1 = ExtResource("1_rccpt") attack1 = ExtResource("1_rccpt")
attack1_box = ExtResource("2_2wu8a")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("4_wrd60") sprite_frames = ExtResource("4_wrd60")
animation_name = "long_air_attack03" animation_name = "long_air_attack03"

@ -1,8 +1,9 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://kpr8aqmnyv2k"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://kpr8aqmnyv2k"]
[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/sharp_normal_hit.tres" id="1_8fm1u"] [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/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="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"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_novna"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_novna"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("2_jrgan") skill_animation = ExtResource("2_jrgan")
free_lock = false free_lock = false
attack1 = ExtResource("1_8fm1u") attack1 = ExtResource("1_8fm1u")
attack1_box = ExtResource("2_s06n4")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("3_jidy7") sprite_frames = ExtResource("3_jidy7")
animation_name = "long_attack02" animation_name = "long_attack02"

@ -1,8 +1,9 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://qele60lk54e1"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://5ufjc1dso0y8"]
[ext_resource type="Resource" uid="uid://ckeuv5lhfk2s0" path="res://config/attack/sharp_normal_hit_back.tres" id="1_7ai5j"] [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/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="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"] [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://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"]
@ -17,7 +18,9 @@ name = ""
skill_animation = ExtResource("2_ugt3f") skill_animation = ExtResource("2_ugt3f")
free_lock = false free_lock = false
attack1 = ExtResource("1_7ai5j") attack1 = ExtResource("1_7ai5j")
attack1_box = ExtResource("2_j0l20")
attack2 = ExtResource("1_7ai5j") attack2 = ExtResource("1_7ai5j")
attack2_box = ExtResource("2_j0l20")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("3_sr2og") sprite_frames = ExtResource("3_sr2og")
animation_name = "long_attack03" animation_name = "long_attack03"

@ -1,10 +1,12 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://dvdr5vd1vbe12"] [gd_resource type="Resource" script_class="SkillPlayerCfg" 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://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="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/player_skill_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="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"] [ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"]
[ext_resource type="Resource" uid="uid://bnfnjdw0tms3h" path="res://config/attack_box/box_large.tres" id="4_7j0pm"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_plyre"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_plyre"]
[resource] [resource]
@ -18,7 +20,9 @@ name = ""
skill_animation = ExtResource("2_sam6s") skill_animation = ExtResource("2_sam6s")
free_lock = false free_lock = false
attack1 = ExtResource("1_44ai1") attack1 = ExtResource("1_44ai1")
attack1_box = ExtResource("2_5jvmg")
attack2 = ExtResource("1_8ipjq") attack2 = ExtResource("1_8ipjq")
attack2_box = ExtResource("4_7j0pm")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("3_w7h1m") sprite_frames = ExtResource("3_w7h1m")
animation_name = "long_attack04" animation_name = "long_attack04"

@ -1,8 +1,9 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://cwqbhrv8bd5vn"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://cwqbhrv8bd5vn"]
[ext_resource type="Resource" uid="uid://cae3dxpuqfcux" path="res://config/attack/sharp_mid_hit.tres" id="1_7yroh"] [ext_resource type="Resource" uid="uid://qmivx7ntfrki" path="res://config/attack/sharp_mid_hit.tres" id="1_7yroh"]
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_ud5ph"] [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="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="2_ewts2"]
[ext_resource type="Resource" uid="uid://bqejjllfy03h3" path="res://config/attack_box/box_normal.tres" id="2_xyemx"]
[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"] [ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_3bf64"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_3bf64"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("2_ewts2") skill_animation = ExtResource("2_ewts2")
free_lock = false free_lock = false
attack1 = ExtResource("1_7yroh") attack1 = ExtResource("1_7yroh")
attack1_box = ExtResource("2_xyemx")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("3_qwjfl") sprite_frames = ExtResource("3_qwjfl")
animation_name = "long_skill01" animation_name = "long_skill01"

@ -1,7 +1,8 @@
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://vvftj1wk88xj"] [gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=7 format=3 uid="uid://vvftj1wk88xj"]
[ext_resource type="Resource" uid="uid://ckbf40c75bfqf" path="res://config/attack/sharp_normal_hit_up.tres" id="1_edtv7"] [ext_resource type="Resource" uid="uid://ckbf40c75bfqf" path="res://config/attack/sharp_normal_hit_up.tres" id="1_edtv7"]
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_1xtt1"] [ext_resource type="Script" path="res://script/config/player_skill_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="Animation" uid="uid://iprcbf277rf4" path="res://resource/skill_animation/hero01_long_skill02.tres" id="3_b7s0y"]
[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="4_rbnly"] [ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="4_rbnly"]
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_u5xo6"] [ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="5_u5xo6"]
@ -17,6 +18,7 @@ name = ""
skill_animation = ExtResource("3_b7s0y") skill_animation = ExtResource("3_b7s0y")
free_lock = false free_lock = false
attack1 = ExtResource("1_edtv7") attack1 = ExtResource("1_edtv7")
attack1_box = ExtResource("2_tsg38")
refresh_animation = false refresh_animation = false
sprite_frames = ExtResource("4_rbnly") sprite_frames = ExtResource("4_rbnly")
animation_name = "long_skill02" animation_name = "long_skill02"

@ -1,8 +1,8 @@
[gd_resource type="ParticleProcessMaterial" load_steps=5 format=3 uid="uid://dubkkji6sm8on"] [gd_resource type="ParticleProcessMaterial" load_steps=5 format=3 uid="uid://dubkkji6sm8on"]
[sub_resource type="Gradient" id="Gradient_fjosh"] [sub_resource type="Gradient" id="Gradient_fjosh"]
offsets = PackedFloat32Array(0, 0.0894942, 0.684825, 1) offsets = PackedFloat32Array(0, 0.239796, 0.684825, 1)
colors = PackedColorArray(0.278431, 0.65098, 1, 0, 0.278431, 0.65098, 1, 1, 0.278431, 0.65098, 1, 0.941176, 0.278431, 0.65098, 1, 0) colors = PackedColorArray(1, 1, 1, 1, 0.278431, 0.65098, 1, 1, 0.278431, 0.65098, 1, 0.941176, 0.278431, 0.65098, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_cypke"] [sub_resource type="GradientTexture1D" id="GradientTexture1D_cypke"]
gradient = SubResource("Gradient_fjosh") gradient = SubResource("Gradient_fjosh")
@ -23,6 +23,5 @@ spread = 0.0
angular_velocity_min = -720.0 angular_velocity_min = -720.0
angular_velocity_max = -720.0 angular_velocity_max = -720.0
gravity = Vector3(0, 0, 0) gravity = Vector3(0, 0, 0)
tangential_accel_min = -100.0
scale_curve = SubResource("CurveTexture_81bpg") scale_curve = SubResource("CurveTexture_81bpg")
color_ramp = SubResource("GradientTexture1D_cypke") color_ramp = SubResource("GradientTexture1D_cypke")

@ -10,7 +10,6 @@ uniform sampler2D screenTexture : hint_screen_texture;
void fragment() void fragment()
{ {
vec2 uv2 = UV - 1.0 * vec2(mod(TIME, 2.0) - 1.0, 0);
vec4 col_mask = texture(tex_mask, UV); vec4 col_mask = texture(tex_mask, UV);
float noiseValueX = (texture(noise, UV + (TIME * speedView)).r * 2.0) - 1.0; // Range: -1.0 to 1.0 float noiseValueX = (texture(noise, UV + (TIME * speedView)).r * 2.0) - 1.0; // Range: -1.0 to 1.0

@ -4,12 +4,21 @@ render_mode blend_add,unshaded,depth_test_disabled;
uniform sampler2D tex_main : source_color; uniform sampler2D tex_main : source_color;
uniform sampler2D tex_noise : source_color; uniform sampler2D tex_noise : source_color;
uniform sampler2D tex_mask : source_color; uniform sampler2D tex_mask : source_color;
uniform sampler2D tex_mask2 : source_color;
uniform sampler2D screenTexture : hint_screen_texture;
void fragment() { void fragment() {
vec4 col_main = texture(tex_main, UV); vec4 col_main = texture(tex_main, UV);
vec4 col_noise = texture(tex_noise, UV - 0.5 * vec2(mod(TIME, 2.0) - 1.0, 0)); vec4 col_noise = texture(tex_noise, UV - 0.5 * vec2(mod(TIME, 2.0) - 1.0, 0));
vec4 col_mask = texture(tex_mask, UV); vec4 col_mask = texture(tex_mask, UV);
vec4 col = col_mask * COLOR * 1.0 + (col_noise + col_main) * COLOR; vec4 col = col_mask * COLOR * 1.0 + (col_noise + col_main) * COLOR;
ALBEDO = col.rgb;
ALPHA = col_mask.r * COLOR.a; vec4 col_mask2 = texture(tex_mask2, UV);
float noiseValueX = col_noise.r;
float noiseValueY = col_noise.r;
vec2 noiseDistort = vec2(noiseValueX, noiseValueY) * 0.1 * col_mask2.r;
vec3 distortedScreenTexture = vec3(texture(screenTexture, SCREEN_UV + noiseDistort).rgb);
ALBEDO = (distortedScreenTexture *4.0 + col.rgb * col_mask.r) * COLOR.rgb;
ALPHA = col_mask2.r * COLOR.a;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1e2fcr0nucku"
path="res://.godot/imported/mask9.png-4358c0d9b828032acfaa12e2c6b20a17.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://render/texture/particle/mask/mask9.png"
dest_files=["res://.godot/imported/mask9.png-4358c0d9b828032acfaa12e2c6b20a17.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

@ -1,6 +1,7 @@
[gd_scene load_steps=16 format=3 uid="uid://8rcvw1vnjcf7"] [gd_scene load_steps=19 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/character.gd" id="1_tonbs"]
[ext_resource type="Script" path="res://script/character/hitbox.gd" id="2_6xf87"]
[ext_resource type="Script" path="res://script/character/status.gd" id="2_txdip"] [ext_resource type="Script" path="res://script/character/status.gd" id="2_txdip"]
[ext_resource type="Shader" path="res://render/shader/character.gdshader" id="3_ed424"] [ext_resource type="Shader" path="res://render/shader/character.gdshader" id="3_ed424"]
[ext_resource type="Script" path="res://script/character/move.gd" id="4_66r53"] [ext_resource type="Script" path="res://script/character/move.gd" id="4_66r53"]
@ -13,7 +14,16 @@
[ext_resource type="Script" path="res://script/character/buff.gd" id="9_jlnhy"] [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/effect.gd" id="12_eyfcd"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_qajx7"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_mmrro"]
height = 1.0
[sub_resource type="Curve" id="Curve_v7nnw"]
_data = [Vector2(0, 0.498516), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ehwx5"]
height = 1.0
radius = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3u7mw"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_3u7mw"]
render_priority = 0 render_priority = 0
@ -29,12 +39,22 @@ _data = [Vector2(0, 6), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2 point_count = 2
[node name="Character" type="CharacterBody3D"] [node name="Character" type="CharacterBody3D"]
collision_layer = 16 collision_layer = 2
script = ExtResource("1_tonbs") script = ExtResource("1_tonbs")
[node name="Collision" type="CollisionShape3D" parent="."] [node name="Collision" type="CollisionShape3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
shape = SubResource("CylinderShape3D_qajx7") shape = SubResource("CylinderShape3D_mmrro")
[node name="Pushbox" type="Area3D" parent="."]
unique_name_in_owner = true
collision_layer = 16
collision_mask = 16
script = ExtResource("2_6xf87")
pushbox_curve = SubResource("Curve_v7nnw")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pushbox"]
shape = SubResource("CylinderShape3D_ehwx5")
[node name="Status" type="Node3D" parent="."] [node name="Status" type="Node3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
@ -81,5 +101,7 @@ hit_back_limit_curve = SubResource("Curve_e7j3f")
unique_name_in_owner = true unique_name_in_owner = true
script = ExtResource("12_eyfcd") script = ExtResource("12_eyfcd")
[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"] [connection signal="animation_finished" from="View" to="View" method="_on_animation_finished"]
[connection signal="animation_finished" from="Skill" to="Skill" method="_on_animation_finished"] [connection signal="animation_finished" from="Skill" to="Skill" method="_on_animation_finished"]

@ -10,7 +10,7 @@
[node name="Character" instance=ExtResource("1_pot50")] [node name="Character" instance=ExtResource("1_pot50")]
[node name="View" parent="." index="2"] [node name="View" parent="." index="3"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.693056, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.693056, 0)
sprite_frames = ExtResource("2_7gyv2") sprite_frames = ExtResource("2_7gyv2")
animation = &"long_attack01" animation = &"long_attack01"

@ -0,0 +1,59 @@
[gd_scene load_steps=12 format=3 uid="uid://cohy1qv35n57q"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_2o8k8"]
[ext_resource type="Shader" path="res://render/shader/effect_slash.gdshader" id="2_f3m3g"]
[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/particle/noise/noise1.png" id="3_paeu0"]
[ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/particle/mask/mask6.png" id="4_0yec6"]
[ext_resource type="Texture2D" uid="uid://c1e2fcr0nucku" path="res://render/texture/particle/mask/mask9.png" id="4_btc32"]
[ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/particle/noise/noise2.png" id="5_yf7h5"]
[ext_resource type="Material" uid="uid://dubkkji6sm8on" path="res://render/process_material/slash_normal.tres" id="6_ceio5"]
[ext_resource type="ArrayMesh" uid="uid://dq207a0waxk0j" path="res://render/mesh/slash1.obj" id="7_tkeme"]
[ext_resource type="Shader" path="res://render/shader/effect_skew1.gdshader" id="8_7m8x8"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hupcc"]
render_priority = 0
shader = ExtResource("2_f3m3g")
shader_parameter/tex_main = ExtResource("3_paeu0")
shader_parameter/tex_noise = ExtResource("5_yf7h5")
shader_parameter/tex_mask = ExtResource("4_btc32")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ntvqm"]
render_priority = 0
shader = ExtResource("8_7m8x8")
shader_parameter/distortionView = 0.03
shader_parameter/speedView = 0.5
shader_parameter/noise = ExtResource("3_paeu0")
shader_parameter/tex_mask = ExtResource("4_0yec6")
[node name="Particle" type="Node3D"]
script = ExtResource("1_2o8k8")
[node name="Slash" type="GPUParticles3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
layers = 512
material_override = SubResource("ShaderMaterial_hupcc")
cast_shadow = 0
gi_mode = 0
amount = 1
lifetime = 0.25
speed_scale = 1.8
fixed_fps = 60
local_coords = true
process_material = ExtResource("6_ceio5")
draw_pass_1 = ExtResource("7_tkeme")
[node name="Skew1" type="GPUParticles3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
layers = 512
material_override = SubResource("ShaderMaterial_ntvqm")
cast_shadow = 0
gi_mode = 0
emitting = false
amount = 1
lifetime = 0.25
one_shot = true
speed_scale = 1.8
fixed_fps = 60
local_coords = true
process_material = ExtResource("6_ceio5")
draw_pass_1 = ExtResource("7_tkeme")

@ -1,13 +1,12 @@
[gd_scene load_steps=11 format=3 uid="uid://b2h4pcmlii7dg"] [gd_scene load_steps=14 format=3 uid="uid://b2h4pcmlii7dg"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_fx8ev"] [ext_resource type="Script" path="res://script/effect/particle.gd" id="1_fx8ev"]
[ext_resource type="Shader" path="res://render/shader/effect_slash.gdshader" id="2_a0jwb"] [ext_resource type="Shader" path="res://render/shader/effect_slash.gdshader" id="2_a0jwb"]
[ext_resource type="Material" uid="uid://dubkkji6sm8on" path="res://render/process_material/slash_normal.tres" id="2_eq67i"]
[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/particle/noise/noise1.png" id="3_fvsr3"] [ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/particle/noise/noise1.png" id="3_fvsr3"]
[ext_resource type="ArrayMesh" uid="uid://dq207a0waxk0j" path="res://render/mesh/slash1.obj" id="3_idjnm"] [ext_resource type="ArrayMesh" uid="uid://dq207a0waxk0j" path="res://render/mesh/slash1.obj" id="3_idjnm"]
[ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/particle/mask/mask6.png" id="4_wvohg"] [ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/particle/mask/mask6.png" id="4_wvohg"]
[ext_resource type="Texture2D" uid="uid://c1e2fcr0nucku" path="res://render/texture/particle/mask/mask9.png" id="5_n15k1"]
[ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/particle/noise/noise2.png" id="5_ymh7m"] [ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/particle/noise/noise2.png" id="5_ymh7m"]
[ext_resource type="Shader" path="res://render/shader/effect_skew1.gdshader" id="8_gng47"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hupcc"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_hupcc"]
render_priority = 0 render_priority = 0
@ -15,14 +14,31 @@ shader = ExtResource("2_a0jwb")
shader_parameter/tex_main = ExtResource("3_fvsr3") shader_parameter/tex_main = ExtResource("3_fvsr3")
shader_parameter/tex_noise = ExtResource("5_ymh7m") shader_parameter/tex_noise = ExtResource("5_ymh7m")
shader_parameter/tex_mask = ExtResource("4_wvohg") shader_parameter/tex_mask = ExtResource("4_wvohg")
shader_parameter/tex_mask2 = ExtResource("5_n15k1")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ntvqm"] [sub_resource type="Curve" id="Curve_7oqkb"]
render_priority = 0 _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.370536, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
shader = ExtResource("8_gng47") point_count = 3
shader_parameter/distortionView = 0.03
shader_parameter/speedView = 0.5 [sub_resource type="CurveTexture" id="CurveTexture_l34bo"]
shader_parameter/noise = ExtResource("3_fvsr3") curve = SubResource("Curve_7oqkb")
shader_parameter/tex_mask = ExtResource("4_wvohg")
[sub_resource type="Gradient" id="Gradient_dobti"]
offsets = PackedFloat32Array(0, 0.137755)
colors = PackedColorArray(1, 1, 1, 1, 0.352133, 0.726909, 1, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_q36ua"]
gradient = SubResource("Gradient_dobti")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_m0ar0"]
particle_flag_rotate_y = true
angle_min = 180.0
angle_max = 180.0
angular_velocity_min = -720.0
angular_velocity_max = -720.0
gravity = Vector3(0, 0, 0)
color_ramp = SubResource("GradientTexture1D_q36ua")
alpha_curve = SubResource("CurveTexture_l34bo")
[node name="Particle" type="Node3D"] [node name="Particle" type="Node3D"]
script = ExtResource("1_fx8ev") script = ExtResource("1_fx8ev")
@ -40,21 +56,9 @@ one_shot = true
speed_scale = 1.8 speed_scale = 1.8
fixed_fps = 60 fixed_fps = 60
local_coords = true local_coords = true
process_material = ExtResource("2_eq67i") process_material = SubResource("ParticleProcessMaterial_m0ar0")
draw_pass_1 = ExtResource("3_idjnm") draw_pass_1 = ExtResource("3_idjnm")
[node name="Skew1" type="GPUParticles3D" parent="."] [node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.555449, 0)
layers = 512 visible = false
material_override = SubResource("ShaderMaterial_ntvqm")
cast_shadow = 0
gi_mode = 0
emitting = false
amount = 1
lifetime = 0.25
one_shot = true
speed_scale = 1.8
fixed_fps = 60
local_coords = true
process_material = ExtResource("2_eq67i")
draw_pass_1 = ExtResource("3_idjnm")

@ -3,4 +3,4 @@
[ext_resource type="PackedScene" uid="uid://b2h4pcmlii7dg" path="res://scene/effect/particle/_particle_slash1.tscn" id="1_5b0hk"] [ext_resource type="PackedScene" uid="uid://b2h4pcmlii7dg" path="res://scene/effect/particle/_particle_slash1.tscn" id="1_5b0hk"]
[node name="Particle" instance=ExtResource("1_5b0hk")] [node name="Particle" instance=ExtResource("1_5b0hk")]
transform = Transform3D(1.2, 0, 0, 0, 0.707107, -0.353553, 0, 0.707107, 0.353553, 0, 0, 0) transform = Transform3D(1.6, 0, 0, 0, 0.707107, -0.353553, 0, 0.707107, 0.353553, 0, 0, 0)

@ -2,6 +2,7 @@ extends CharacterBody3D
class_name Character class_name Character
@onready var collision = (%Collision) @onready var collision = (%Collision)
@onready var pushbox = (%Pushbox)
@onready var status = (%Status as Status) @onready var status = (%Status as Status)
@onready var view = (%View as View) @onready var view = (%View as View)
@onready var buff = (%Buff as Buff) @onready var buff = (%Buff as Buff)
@ -16,9 +17,11 @@ func init(id:int,cfg:CharacterCfg,team:Enum.ETeam):
var half_height = Setting.pixel_size * cfg.sprite_harf_height var half_height = Setting.pixel_size * cfg.sprite_harf_height
var height = half_height * 2 var height = half_height * 2
var width = Setting.pixel_size * cfg.sprite_width var width = Setting.pixel_size * cfg.sprite_width
var body_scale = Vector3(width,half_height,width) var body_scale = Vector3(width,height,width)
collision.position = Vector3(0,half_height,0) collision.position = Vector3(0,half_height,0)
collision.scale = body_scale collision.scale = body_scale
pushbox.position = Vector3(0,half_height,0)
pushbox.scale = body_scale
status.basic_offset = Vector3(0,half_height,0) status.basic_offset = Vector3(0,half_height,0)
status.ui_offset = Vector3(0,height*1.1,0) status.ui_offset = Vector3(0,height*1.1,0)
status.ui_center_offset = Vector3(0,half_height,0) status.ui_center_offset = Vector3(0,half_height,0)

@ -97,6 +97,7 @@ func _cast_particle(resource:Resource ,is_attach:bool):
func release_effect(): func release_effect():
for particle:Particle in particle_list(): for particle:Particle in particle_list():
_release_effect(particle) _release_effect(particle)
temp_release_particle_list.clear()
func _release_effect(particle:Particle): func _release_effect(particle:Particle):
particle.set_pause(false) particle.set_pause(false)

@ -0,0 +1,36 @@
extends Area3D
class_name PushBox
@export var pushbox_curve : Curve
@onready var character = (get_owner() as Character)
@onready var radius = $CollisionShape3D.shape.radius * scale.x
var pushbox_list = []
func _process(delta):
var speed_dir = character.get_status("speed_dir") as Vector2
if speed_dir.length() == 0:
return
var speed_down_push_rate = 0
var pos = character.pos2D()
for pushbox:PushBox in pushbox_list:
var target_pos = pushbox.character.pos2D()
var dir = target_pos - pos
if speed_dir.dot(dir) <= 0:
continue
var dist = dir.length()
if dist == 0:
continue
var dist_rate = clamp(dist/(radius+pushbox.radius),0,1)
speed_down_push_rate = max(speed_down_push_rate,pushbox_curve.sample(dist_rate))
character.set_status("speed_down_push_rate",speed_down_push_rate)
func on_area_entered(area:Area3D):
if area is PushBox:
pushbox_list.append(area)
func on_area_exited(area:Area3D):
if area is PushBox:
pushbox_list.erase(area)

@ -51,16 +51,16 @@ func update_move(delta):
var skill_velocity = status.skill_dir * status.skill_move_speed var skill_velocity = status.skill_dir * status.skill_move_speed
var hit_back_velocity = status.hit_back_dir * status.hit_back_speed var hit_back_velocity = status.hit_back_dir * status.hit_back_speed
move_velocity += skill_velocity + hit_back_velocity move_velocity += skill_velocity + hit_back_velocity
status.speed_dir = Vector2(move_velocity.x,move_velocity.y)
if status.skill_move_speed >0:
move_velocity *= (1-status.speed_down_push_rate)
if move_velocity.length() == 0: if move_velocity.length() == 0:
move_velocity = Vector2(character.velocity.x,character.velocity.z); move_velocity = Vector2(character.velocity.x,character.velocity.z);
if status.is_on_floor: if status.is_on_floor:
move_velocity = Util.vector_reduce(move_velocity,Setting.drag_ground*delta) move_velocity = Util.vector_reduce(move_velocity,Setting.drag_ground*delta)
else: else:
move_velocity = Util.vector_reduce(move_velocity,Setting.drag_air*delta) move_velocity = Util.vector_reduce(move_velocity,Setting.drag_air*delta)
else:
move_velocity.x = move_velocity.x
move_velocity.y = move_velocity.y
character.velocity.x = move_velocity.x character.velocity.x = move_velocity.x
character.velocity.z = move_velocity.y character.velocity.z = move_velocity.y

@ -37,7 +37,9 @@ class_name Status
@export_category("移动状态") @export_category("移动状态")
@export var move_dir : Vector2 #移动方向 @export var move_dir : Vector2 #移动方向
@export var speed_dir : Vector2 #速度方向
@export var velocity_change : Vector3 #一帧内速度变化值 @export var velocity_change : Vector3 #一帧内速度变化值
@export var speed_down_push_rate : float #来自软阻挡的速度减少比率
@export var speed_up_rate : float #移动速度比率 @export var speed_up_rate : float #移动速度比率
@export var speed_xz : float #水平移动速度 @export var speed_xz : float #水平移动速度
@export var speed_y : float #竖直移动速度 @export var speed_y : float #竖直移动速度

Loading…
Cancel
Save