受击特效优化 地对空连击优化

master
chendian 10 months ago
parent a1c0690e1c
commit cdc4074c80

@ -14,7 +14,7 @@ is_stop_self = true
is_throw_check = false
is_throw_end = false
hit_back_speed = 2.0
hit_up_speed = 2.0
hit_up_speed = 1.5
hit_back_duration = 0.05
hit_up_duration = 0.05
pause_time = 0.05

@ -9,13 +9,12 @@ break_level = 1
stun_attack = 10.0
damage_type = 1
is_floating = false
is_hit_down = false
is_rebound = false
is_stop_self = true
is_throw_check = false
is_throw_end = false
hit_back_speed = 3.0
hit_up_speed = 3.0
hit_up_speed = 1.0
hit_back_duration = 0.05
hit_up_duration = 0.05
pause_time = 0.05

@ -9,7 +9,6 @@ break_level = 1
stun_attack = 10.0
damage_type = 1
is_floating = true
is_hit_down = false
is_rebound = false
is_stop_self = true
is_throw_check = false

@ -9,7 +9,6 @@ break_level = 1
stun_attack = 10.0
damage_type = 1
is_floating = true
is_hit_down = false
is_rebound = false
is_stop_self = false
is_throw_check = false

@ -19,7 +19,7 @@ shield = ExtResource("6_u7wv4")
stun = ExtResource("7_txgsx")
mp = ExtResource("4_alws1")
hp_max = 100.0
attack = 10.0
attack = 1.0
attack1 = ExtResource("1_at6jo")
attack1_box = ExtResource("2_780us")
sub_character_auto_create = false

@ -23,5 +23,5 @@ ai = ExtResource("1_lr20m")
hp_max = 1000.0
attack = 10.0
sub_character_auto_create = false
material_on = 0
material_off = 0
material_on = 1
material_off = 1

@ -1,11 +1,9 @@
shader_type spatial;
render_mode blend_add,unshaded,depth_test_disabled,particle_trails;
render_mode unshaded,particle_trails;
uniform sampler2D tex_main : source_color;
uniform sampler2D tex_gradient : source_color;
void fragment() {
vec3 col_main = texture(tex_main, UV).rgb;
vec3 col = texture(tex_gradient, vec2(COLOR.a,0.5)).rgb;
ALBEDO = col;
ALPHA = COLOR.a;

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

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

@ -0,0 +1,16 @@
[gd_resource type="RibbonTrailMesh" load_steps=4 format=3 uid="uid://c3rjewvjwg3nq"]
[ext_resource type="Shader" path="res://render/shader/trail.gdshader" id="1_oxqru"]
[ext_resource type="Texture2D" uid="uid://ciusodtprwghg" path="res://render/texture/particle/gradient/gradient4.png" id="2_t6tky"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_od7xi"]
render_priority = 0
shader = ExtResource("1_oxqru")
shader_parameter/tex_gradient = ExtResource("2_t6tky")
[resource]
material = SubResource("ShaderMaterial_od7xi")
size = 0.02
sections = 2
section_length = 0.05
section_segments = 4

@ -1,17 +1,17 @@
[gd_scene load_steps=6 format=3 uid="uid://b0ogpoluxbsxx"]
[ext_resource type="Script" path="res://script/effect/fragment.gd" id="1_blddo"]
[ext_resource type="Material" uid="uid://b3mpocbc8svx2" path="res://render/material/fragment.tres" id="2_cd8nd"]
[ext_resource type="PackedScene" uid="uid://ccxyyunj4ohqt" path="res://scene/effect/particle/particle_blood_decal.tscn" id="2_hrv13"]
[ext_resource type="Texture2D" uid="uid://bcrr12gbos636" path="res://render/texture/particle/shape/fragment1.png" id="3_vu5gy"]
[ext_resource type="Script" path="res://script/effect/fragment.gd" id="1_cgwed"]
[ext_resource type="PackedScene" uid="uid://ccxyyunj4ohqt" path="res://scene/effect/particle/particle_blood_decal.tscn" id="2_2xoel"]
[ext_resource type="Material" uid="uid://b3mpocbc8svx2" path="res://render/material/fragment.tres" id="3_8m7fg"]
[ext_resource type="Texture2D" uid="uid://bcrr12gbos636" path="res://render/texture/particle/shape/fragment1.png" id="4_4mpud"]
[sub_resource type="SphereShape3D" id="SphereShape3D_1r022"]
radius = 0.1
[node name="Fragment" type="CharacterBody3D"]
collision_layer = 256
script = ExtResource("1_blddo")
sub = ExtResource("2_hrv13")
script = ExtResource("1_cgwed")
sub = ExtResource("2_2xoel")
velocity_min = Vector2(1, 2)
velocity_max = Vector2(2, 4)
@ -20,9 +20,9 @@ shape = SubResource("SphereShape3D_1r022")
[node name="Sprite3D" type="Sprite3D" parent="."]
unique_name_in_owner = true
material_override = ExtResource("2_cd8nd")
material_override = ExtResource("3_8m7fg")
modulate = Color(0, 0, 0, 1)
pixel_size = 0.004
texture = ExtResource("3_vu5gy")
texture = ExtResource("4_4mpud")
hframes = 2
vframes = 2

@ -0,0 +1,27 @@
[gd_scene load_steps=5 format=3 uid="uid://bfnwt1jr830pa"]
[ext_resource type="Script" path="res://script/effect/fragment.gd" id="1_14ie3"]
[ext_resource type="Material" uid="uid://b3mpocbc8svx2" path="res://render/material/fragment.tres" id="3_0tado"]
[ext_resource type="Texture2D" uid="uid://bcrr12gbos636" path="res://render/texture/particle/shape/fragment1.png" id="4_0awd6"]
[sub_resource type="SphereShape3D" id="SphereShape3D_1r022"]
radius = 0.1
[node name="Fragment" type="CharacterBody3D"]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
collision_layer = 256
script = ExtResource("1_14ie3")
velocity_min = Vector2(1, 2)
velocity_max = Vector2(2, 4)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_1r022")
[node name="Sprite3D" type="Sprite3D" parent="."]
unique_name_in_owner = true
material_override = ExtResource("3_0tado")
modulate = Color(0, 0, 0, 1)
pixel_size = 0.004
texture = ExtResource("4_0awd6")
hframes = 2
vframes = 2

@ -0,0 +1,14 @@
[gd_scene load_steps=4 format=3 uid="uid://j0wrno4hl0hp"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_5dxmp"]
[ext_resource type="Script" path="res://script/effect/particle_sub_emitter.gd" id="2_npeka"]
[ext_resource type="PackedScene" uid="uid://b0ogpoluxbsxx" path="res://scene/effect/particle/particle_blood_fragment.tscn" id="3_ww4rr"]
[node name="Particle" type="Node3D"]
script = ExtResource("1_5dxmp")
[node name="ParticleSubEmitter" type="Node3D" parent="."]
script = ExtResource("2_npeka")
sub = ExtResource("3_ww4rr")
count_min = 5
count_max = 8

@ -116,14 +116,14 @@ alpha_curve = SubResource("CurveTexture_3pi6l")
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_wpjie"]
[sub_resource type="CurveTexture" id="CurveTexture_a3tb2"]
curve = SubResource("Curve_axcwu")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_5lomq"]
spread = 180.0
initial_velocity_min = 4.0
initial_velocity_max = 5.0
alpha_curve = SubResource("CurveTexture_wpjie")
alpha_curve = SubResource("CurveTexture_a3tb2")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_j0rbf"]
render_priority = 0

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_a6aoh"]
[ext_resource type="Shader" path="res://render/shader/particle.gdshader" id="2_huo8i"]
[ext_resource type="Texture2D" uid="uid://bqqa04cq6brul" path="res://render/texture/particle/shape/flare6.png" id="3_is87m"]
[ext_resource type="Texture2D" uid="uid://4lejpbicrnqv" path="res://render/texture/particle/shape/flare6.png" id="3_is87m"]
[ext_resource type="Texture2D" uid="uid://bslhqlcg8cw2l" path="res://render/texture/particle/shape/flare3.png" id="4_3vqto"]
[ext_resource type="Texture2D" uid="uid://ddrm1reu30eux" path="res://render/texture/common/common_emission.tres" id="4_p7mgx"]
[ext_resource type="RibbonTrailMesh" uid="uid://cv0787wcswb6d" path="res://render/trail_mesh/flare_blunt.tres" id="6_48ph4"]

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_vgayn"]
[ext_resource type="Shader" path="res://render/shader/particle.gdshader" id="2_g5eyu"]
[ext_resource type="Texture2D" uid="uid://bqqa04cq6brul" path="res://render/texture/particle/shape/flare6.png" id="3_da2in"]
[ext_resource type="Texture2D" uid="uid://4lejpbicrnqv" path="res://render/texture/particle/shape/flare6.png" id="3_da2in"]
[ext_resource type="Texture2D" uid="uid://ddrm1reu30eux" path="res://render/texture/common/common_emission.tres" id="4_ht0kc"]
[ext_resource type="Texture2D" uid="uid://bslhqlcg8cw2l" path="res://render/texture/particle/shape/flare3.png" id="4_pgf8e"]

@ -0,0 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://c586yw1w3w5ja"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_mj544"]
[ext_resource type="Script" path="res://script/effect/particle_sub_emitter.gd" id="2_k8mlr"]
[ext_resource type="PackedScene" uid="uid://bfnwt1jr830pa" path="res://scene/effect/particle/particle_common_fragment.tscn" id="3_lryd5"]
[node name="Particle" type="Node3D"]
script = ExtResource("1_mj544")
[node name="ParticleSubEmitter" type="Node3D" parent="."]
script = ExtResource("2_k8mlr")
sub = ExtResource("3_lryd5")
count_min = 2
count_max = 3
lifetime = 0.1

@ -1,14 +1,43 @@
[gd_scene load_steps=4 format=3 uid="uid://j0wrno4hl0hp"]
[gd_scene load_steps=8 format=3 uid="uid://blt6kqia1fdim"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_kd50q"]
[ext_resource type="Script" path="res://script/effect/particle_sub_emitter.gd" id="2_osya7"]
[ext_resource type="PackedScene" uid="uid://b0ogpoluxbsxx" path="res://scene/effect/particle/particle_fragment.tscn" id="3_o8j15"]
[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_m0soh"]
[ext_resource type="RibbonTrailMesh" uid="uid://c3rjewvjwg3nq" path="res://render/trail_mesh/fragment_cloth.tres" id="2_foper"]
[sub_resource type="Curve" id="Curve_sjrhq"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_wpjie"]
curve = SubResource("Curve_sjrhq")
[sub_resource type="Curve" id="Curve_bxm7h"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_apkn5"]
curve = SubResource("Curve_bxm7h")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nv0pr"]
spread = 180.0
initial_velocity_min = 2.0
initial_velocity_max = 3.0
gravity = Vector3(0, -1, 0)
damping_min = 2.0
damping_max = 2.0
alpha_curve = SubResource("CurveTexture_wpjie")
turbulence_enabled = true
turbulence_noise_strength = 2.0
turbulence_noise_speed_random = 2.0
turbulence_influence_over_life = SubResource("CurveTexture_apkn5")
[node name="Particle" type="Node3D"]
script = ExtResource("1_kd50q")
script = ExtResource("1_m0soh")
[node name="ParticleSubEmitter" type="Node3D" parent="."]
script = ExtResource("2_osya7")
sub = ExtResource("3_o8j15")
count_min = 5
count_max = 8
[node name="Flare" type="GPUParticles3D" parent="."]
emitting = false
one_shot = true
explosiveness = 1.0
trail_enabled = true
trail_lifetime = 0.1
process_material = SubResource("ParticleProcessMaterial_nv0pr")
draw_pass_1 = ExtResource("2_foper")

@ -7,6 +7,7 @@ const animation_frame_rate: float = 0.1
const animation_speed_scale: float = 1.0
#技能系统
const input_alive_time: float = 0.5
const bullet_cd: float = 0.1
#移动
const drag_ground: float = 20
const drag_air: float = 5

@ -66,6 +66,8 @@ func update_skill_move() -> void:
func update_bullet() -> void:
if character.has_buff("bullet_cd"):
return
if not status.ai_bullet_order:
return
var bullet_order: Status.BulletOrder = status.ai_bullet_order[0]
@ -77,6 +79,7 @@ func update_bullet() -> void:
if sub:
sub.set_status("target", bullet_order.target)
status.ai_bullet_order.remove_at(0)
character.add_buff("bullet_cd", Setting.bullet_cd)
func update_move() -> void:

@ -290,9 +290,10 @@ func settle(from: int, to: int, dir: Vector2, attack: AttackCfg) -> HitResult:
_: pass
if particle_hit:
character_to.cast_particle(particle_hit, false)
#受击通用特效
character_to.cast_particle(ResourceManager.particle_hit_common, false)
#受击材质特效
if (damage > 0) and (break_level_sub > 2):
if damage > 0:
var material: Enum.EMaterial = cfg_to.material_on if has_shield else cfg_to.material_off
match material:
Enum.EMaterial.Cloth: character_to.cast_particle(ResourceManager.particle_material_cloth, false)

@ -26,14 +26,16 @@ var particle_hit_sharp_block: PackedScene = load("res://scene/effect/particle/p
#hit_ground
var particle_hit_ground_normal: PackedScene = load("res://scene/effect/particle/particle_hit_ground_normal.tscn")
var particle_hit_ground_heavy: PackedScene = load("res://scene/effect/particle/particle_hit_ground_heavy.tscn")
#hit_common
var particle_hit_common: PackedScene = load("res://scene/effect/particle/particle_hit_common.tscn")
#hit_material
var particle_material_cloth: PackedScene = load("res://scene/effect/particle/particle_material_cloth.tscn")
#move
var particle_move_hit_ground: PackedScene = load("res://scene/effect/particle/particle_move_hit_ground.tscn")
var particle_move_dash: PackedScene = load("res://scene/effect/particle/particle_move_dash.tscn")
var particle_move_speed: PackedScene = load("res://scene/effect/particle/particle_move_speed.tscn")
var particle_move_jump_ground: PackedScene = load("res://scene/effect/particle/particle_move_jump_ground.tscn")
var particle_move_jump_air: PackedScene = load("res://scene/effect/particle/particle_move_jump_air.tscn")
#hit_material
var particle_material_cloth: PackedScene = load("res://scene/effect/particle/particle_material_cloth.tscn")
#collect
var particle_pt_collect: PackedScene = load("res://scene/effect/particle/particle_pt_collect.tscn")
#warn

Loading…
Cancel
Save