diff --git a/config/attack/heavy_hit_blow.tres b/config/attack/heavy_hit_blow.tres index e0ee8aa..360f60c 100644 --- a/config/attack/heavy_hit_blow.tres +++ b/config/attack/heavy_hit_blow.tres @@ -7,11 +7,11 @@ script = ExtResource("1_j177j") damage_rate = 1.0 break_level = 3 stun_attack = 10.0 -hit_back_speed = 4.0 +hit_back_speed = 10.0 hit_back_duration = 0.05 -hit_up_speed = 4.0 +hit_up_speed = 2.0 hit_up_duration = 0.05 -pause_time = 0.15 +pause_time = 0.3 is_floating = true is_hit_down = false is_rebound = false diff --git a/render/material/effect_hit.tres b/render/material/effect_hit.tres index f78a2f9..c9971a0 100644 --- a/render/material/effect_hit.tres +++ b/render/material/effect_hit.tres @@ -1,9 +1,10 @@ [gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://tlhcll6fyp7q"] [ext_resource type="Shader" path="res://render/shader/effect_billboard.gdshader" id="1_jw6vt"] -[ext_resource type="Texture2D" uid="uid://bb0yfk0u4lqqn" path="res://render/texture/shape/flare.png" id="2_x6l5a"] +[ext_resource type="Texture2D" uid="uid://bb0yfk0u4lqqn" path="res://render/texture/particle/shape/flare.png" id="2_ax7mv"] [resource] render_priority = 0 shader = ExtResource("1_jw6vt") -shader_parameter/tex_main = ExtResource("2_x6l5a") +shader_parameter/sheet_size = Vector2(1, 1) +shader_parameter/tex_main = ExtResource("2_ax7mv") diff --git a/render/material/effect_skew1.tres b/render/material/effect_skew1.tres index 4cfb1f5..f246e9d 100644 --- a/render/material/effect_skew1.tres +++ b/render/material/effect_skew1.tres @@ -1,8 +1,8 @@ [gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://bkbuvtya3uk3x"] [ext_resource type="Shader" path="res://render/shader/effect_skew1.gdshader" id="1_dcuof"] -[ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/mask/mask6.png" id="3_p44lv"] -[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/noise/noise1.png" id="4_vjpnf"] +[ext_resource type="Texture2D" uid="uid://csjm7d1tg6b50" path="res://render/texture/particle/mask/mask6.png" id="3_p44lv"] +[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/particle/noise/noise1.png" id="4_vjpnf"] [resource] render_priority = 0 diff --git a/render/material/effect_slash.tres b/render/material/effect_slash.tres index 8f371d2..f792e9a 100644 --- a/render/material/effect_slash.tres +++ b/render/material/effect_slash.tres @@ -1,9 +1,9 @@ [gd_resource type="ShaderMaterial" load_steps=5 format=3 uid="uid://dtyosukxpf33d"] [ext_resource type="Shader" path="res://render/shader/effect_slash.gdshader" id="1_s5fvm"] -[ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/noise/noise2.png" id="2_gu3jv"] -[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/noise/noise1.png" id="3_p66ui"] -[ext_resource type="Texture2D" uid="uid://cksxjvafx2skm" path="res://render/texture/mask/mask5.png" id="3_r0nln"] +[ext_resource type="Texture2D" uid="uid://dd3e7ol8qa5eq" path="res://render/texture/particle/noise/noise2.png" id="2_gu3jv"] +[ext_resource type="Texture2D" uid="uid://c4byf37he3mjt" path="res://render/texture/particle/noise/noise1.png" id="3_p66ui"] +[ext_resource type="Texture2D" uid="uid://cksxjvafx2skm" path="res://render/texture/particle/mask/mask5.png" id="3_r0nln"] [resource] render_priority = 0 diff --git a/render/shader/effect_billboard.gdshader b/render/shader/effect_billboard.gdshader index 8650669..77f87ae 100644 --- a/render/shader/effect_billboard.gdshader +++ b/render/shader/effect_billboard.gdshader @@ -2,15 +2,12 @@ shader_type spatial; render_mode blend_add,unshaded; uniform sampler2D tex_main : source_color; +uniform vec2 sheet_size = vec2(1,1); //void vertex() { - //mat4 modified_model_view = VIEW_MATRIX * mat4( - //INV_VIEW_MATRIX[0], - //INV_VIEW_MATRIX[1], - //INV_VIEW_MATRIX[2], - //MODEL_MATRIX[3] - //); - //MODELVIEW_MATRIX = modified_model_view; + //vec3 billboard_offset = VERTEX; + //VERTEX.xz = normalize(INV_VIEW_MATRIX[0].xz) * billboard_offset.x + normalize(INV_VIEW_MATRIX[2].xz) * billboard_offset.z; + //VERTEX.y = billboard_offset.y; //} void fragment() { diff --git a/render/shader/post_process.gdshader b/render/shader/post_process.gdshader new file mode 100644 index 0000000..23ce410 --- /dev/null +++ b/render/shader/post_process.gdshader @@ -0,0 +1,34 @@ +shader_type canvas_item; + +uniform float shift_strength : hint_range(0.0, 1.0); +uniform float blur_strength : hint_range(0.0, 1.0); +uniform float vignette_alpha : hint_range(0.0, 1.0); +uniform float vignette_inner : hint_range(0.0, 1.0) = 0.5; +uniform float vignette_outer : hint_range(0.0, 2.0) = 1.0; + +void fragment() { + vec3 color = vec3(0); + + //模糊+色移 + float shift = 0.01 * shift_strength; + float blur = 0.01 * blur_strength; + vec2 direction = UV - vec2(0.5); + float f = 0.1; + color *= f; + for(int i=1; i < 10; i++) { + vec2 target_uv = UV - blur * direction * float(i); + vec3 target_color = vec3(0); + target_color.r = texture(TEXTURE, vec2(target_uv.x + shift, target_uv.y)).r; + target_color.g = texture(TEXTURE, target_uv).g; + target_color.b = texture(TEXTURE, vec2(target_uv.x - shift, target_uv.y)).b; + color += target_color * f; + } + + //暗角 + float x = abs(UV.r-.5)*2.0; + float y = abs(UV.g-.5)*2.0; + float q = 1.0-(1.0-sqrt(x*x+y*y)/vignette_outer)/(1.0-vignette_inner); + q = clamp(q*vignette_alpha,0.0,1.1); + color *= (1.0-q); + COLOR.rgb = color; +} \ No newline at end of file diff --git a/render/texture/shape/1.py b/render/texture/decal/1.py similarity index 100% rename from render/texture/shape/1.py rename to render/texture/decal/1.py diff --git a/render/texture/shape/decal_dust.png b/render/texture/decal/decal_dust.png similarity index 100% rename from render/texture/shape/decal_dust.png rename to render/texture/decal/decal_dust.png diff --git a/render/texture/shape/decal_dust.png.import b/render/texture/decal/decal_dust.png.import similarity index 70% rename from render/texture/shape/decal_dust.png.import rename to render/texture/decal/decal_dust.png.import index 22b5107..28dab5e 100644 --- a/render/texture/shape/decal_dust.png.import +++ b/render/texture/decal/decal_dust.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://brgii0qi4s6kb" -path="res://.godot/imported/decal_dust.png-018d105ab63df278ad4deeb5e793a989.ctex" +path="res://.godot/imported/decal_dust.png-3cd05ebb11d27a55ddf628d9e58a4332.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/decal_dust.png" -dest_files=["res://.godot/imported/decal_dust.png-018d105ab63df278ad4deeb5e793a989.ctex"] +source_file="res://render/texture/decal/decal_dust.png" +dest_files=["res://.godot/imported/decal_dust.png-3cd05ebb11d27a55ddf628d9e58a4332.ctex"] [params] diff --git a/render/texture/shape/decal_explode.png b/render/texture/decal/decal_explode.png similarity index 100% rename from render/texture/shape/decal_explode.png rename to render/texture/decal/decal_explode.png diff --git a/render/texture/shape/decal_explode.png.import b/render/texture/decal/decal_explode.png.import similarity index 70% rename from render/texture/shape/decal_explode.png.import rename to render/texture/decal/decal_explode.png.import index 99ad2e5..c1c5777 100644 --- a/render/texture/shape/decal_explode.png.import +++ b/render/texture/decal/decal_explode.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bjv7f83tdgq17" -path="res://.godot/imported/decal_explode.png-469403a7e0538c7d5588ac39ef569a1a.ctex" +path="res://.godot/imported/decal_explode.png-4176aa906657687b659f54564b3a1045.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/decal_explode.png" -dest_files=["res://.godot/imported/decal_explode.png-469403a7e0538c7d5588ac39ef569a1a.ctex"] +source_file="res://render/texture/decal/decal_explode.png" +dest_files=["res://.godot/imported/decal_explode.png-4176aa906657687b659f54564b3a1045.ctex"] [params] diff --git a/render/texture/shape/decal_glow.png b/render/texture/decal/decal_glow.png similarity index 100% rename from render/texture/shape/decal_glow.png rename to render/texture/decal/decal_glow.png diff --git a/render/texture/shape/decal_glow.png.import b/render/texture/decal/decal_glow.png.import similarity index 70% rename from render/texture/shape/decal_glow.png.import rename to render/texture/decal/decal_glow.png.import index be43738..5c4f9a2 100644 --- a/render/texture/shape/decal_glow.png.import +++ b/render/texture/decal/decal_glow.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b6bfacouwy2hi" -path="res://.godot/imported/decal_glow.png-60e7c65c14d9ba83f9accaada44f46cd.ctex" +path="res://.godot/imported/decal_glow.png-1bf42d39e20f3ed89271df660623877e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/decal_glow.png" -dest_files=["res://.godot/imported/decal_glow.png-60e7c65c14d9ba83f9accaada44f46cd.ctex"] +source_file="res://render/texture/decal/decal_glow.png" +dest_files=["res://.godot/imported/decal_glow.png-1bf42d39e20f3ed89271df660623877e.ctex"] [params] diff --git a/render/texture/shape/decal_shockwave.png b/render/texture/decal/decal_shockwave.png similarity index 100% rename from render/texture/shape/decal_shockwave.png rename to render/texture/decal/decal_shockwave.png diff --git a/render/texture/shape/decal_shockwave.png.import b/render/texture/decal/decal_shockwave.png.import similarity index 69% rename from render/texture/shape/decal_shockwave.png.import rename to render/texture/decal/decal_shockwave.png.import index 56fd8f2..d3eaa3b 100644 --- a/render/texture/shape/decal_shockwave.png.import +++ b/render/texture/decal/decal_shockwave.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dkhmqgtc8tn1t" -path="res://.godot/imported/decal_shockwave.png-ff3f5745d48dd37c112ee6075801a729.ctex" +path="res://.godot/imported/decal_shockwave.png-260ea4c33b79d9ba58beff7b92e8ff3f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/decal_shockwave.png" -dest_files=["res://.godot/imported/decal_shockwave.png-ff3f5745d48dd37c112ee6075801a729.ctex"] +source_file="res://render/texture/decal/decal_shockwave.png" +dest_files=["res://.godot/imported/decal_shockwave.png-260ea4c33b79d9ba58beff7b92e8ff3f.ctex"] [params] diff --git a/render/texture/shape/decal_sword.png b/render/texture/decal/decal_sword.png similarity index 100% rename from render/texture/shape/decal_sword.png rename to render/texture/decal/decal_sword.png diff --git a/render/texture/shape/decal_sword.png.import b/render/texture/decal/decal_sword.png.import similarity index 70% rename from render/texture/shape/decal_sword.png.import rename to render/texture/decal/decal_sword.png.import index c64de72..d8b85d1 100644 --- a/render/texture/shape/decal_sword.png.import +++ b/render/texture/decal/decal_sword.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://ceu7b4nuktlgy" -path="res://.godot/imported/decal_sword.png-ca0e8413a122e9ea54f5877a2e742f7f.ctex" +path="res://.godot/imported/decal_sword.png-b5eff293a7fb07264b2b4062598592ca.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/decal_sword.png" -dest_files=["res://.godot/imported/decal_sword.png-ca0e8413a122e9ea54f5877a2e742f7f.ctex"] +source_file="res://render/texture/decal/decal_sword.png" +dest_files=["res://.godot/imported/decal_sword.png-b5eff293a7fb07264b2b4062598592ca.ctex"] [params] diff --git a/render/texture/shape/lock.png b/render/texture/decal/lock.png similarity index 100% rename from render/texture/shape/lock.png rename to render/texture/decal/lock.png diff --git a/render/texture/shape/lock.png.import b/render/texture/decal/lock.png.import similarity index 72% rename from render/texture/shape/lock.png.import rename to render/texture/decal/lock.png.import index e29721f..d9b0274 100644 --- a/render/texture/shape/lock.png.import +++ b/render/texture/decal/lock.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dx2vp753yvh4y" -path="res://.godot/imported/lock.png-c9af2b7e378d675c56581df22939f427.ctex" +path="res://.godot/imported/lock.png-32166d0b031590623c7496bf56c8f4a7.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/lock.png" -dest_files=["res://.godot/imported/lock.png-c9af2b7e378d675c56581df22939f427.ctex"] +source_file="res://render/texture/decal/lock.png" +dest_files=["res://.godot/imported/lock.png-32166d0b031590623c7496bf56c8f4a7.ctex"] [params] diff --git a/render/texture/shape/readiness_bullet.png b/render/texture/decal/readiness_bullet.png similarity index 100% rename from render/texture/shape/readiness_bullet.png rename to render/texture/decal/readiness_bullet.png diff --git a/render/texture/shape/readiness_bullet.png.import b/render/texture/decal/readiness_bullet.png.import similarity index 69% rename from render/texture/shape/readiness_bullet.png.import rename to render/texture/decal/readiness_bullet.png.import index 69322f6..1c63c52 100644 --- a/render/texture/shape/readiness_bullet.png.import +++ b/render/texture/decal/readiness_bullet.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bd7kst3jrrma5" -path="res://.godot/imported/readiness_bullet.png-948274b2b501dfc9e3c74f03cb74d333.ctex" +path="res://.godot/imported/readiness_bullet.png-434339fa41cc310d076446d873fd9c8f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/readiness_bullet.png" -dest_files=["res://.godot/imported/readiness_bullet.png-948274b2b501dfc9e3c74f03cb74d333.ctex"] +source_file="res://render/texture/decal/readiness_bullet.png" +dest_files=["res://.godot/imported/readiness_bullet.png-434339fa41cc310d076446d873fd9c8f.ctex"] [params] diff --git a/render/texture/shape/readiness_hero.png b/render/texture/decal/readiness_hero.png similarity index 100% rename from render/texture/shape/readiness_hero.png rename to render/texture/decal/readiness_hero.png diff --git a/render/texture/shape/readiness_hero.png.import b/render/texture/decal/readiness_hero.png.import similarity index 69% rename from render/texture/shape/readiness_hero.png.import rename to render/texture/decal/readiness_hero.png.import index 7bc6bd2..5af68fe 100644 --- a/render/texture/shape/readiness_hero.png.import +++ b/render/texture/decal/readiness_hero.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dpsxejelj58f8" -path="res://.godot/imported/readiness_hero.png-79941e71d54e0f21f93bb8731b58c44c.ctex" +path="res://.godot/imported/readiness_hero.png-04f53279c7d7b463a907262c0dc43fcc.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/readiness_hero.png" -dest_files=["res://.godot/imported/readiness_hero.png-79941e71d54e0f21f93bb8731b58c44c.ctex"] +source_file="res://render/texture/decal/readiness_hero.png" +dest_files=["res://.godot/imported/readiness_hero.png-04f53279c7d7b463a907262c0dc43fcc.ctex"] [params] diff --git a/render/texture/shape/readiness_monster.png b/render/texture/decal/readiness_monster.png similarity index 100% rename from render/texture/shape/readiness_monster.png rename to render/texture/decal/readiness_monster.png diff --git a/render/texture/shape/readiness_monster.png.import b/render/texture/decal/readiness_monster.png.import similarity index 69% rename from render/texture/shape/readiness_monster.png.import rename to render/texture/decal/readiness_monster.png.import index a751647..b88da99 100644 --- a/render/texture/shape/readiness_monster.png.import +++ b/render/texture/decal/readiness_monster.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://xtipei54v35i" -path="res://.godot/imported/readiness_monster.png-7c27fc050064accb74fc75d7edb38639.ctex" +path="res://.godot/imported/readiness_monster.png-00a6eb3ae03b3f62149da59c65ec229f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/readiness_monster.png" -dest_files=["res://.godot/imported/readiness_monster.png-7c27fc050064accb74fc75d7edb38639.ctex"] +source_file="res://render/texture/decal/readiness_monster.png" +dest_files=["res://.godot/imported/readiness_monster.png-00a6eb3ae03b3f62149da59c65ec229f.ctex"] [params] diff --git a/render/texture/mask/angle_mask.png b/render/texture/particle/mask/angle_mask.png similarity index 100% rename from render/texture/mask/angle_mask.png rename to render/texture/particle/mask/angle_mask.png diff --git a/render/texture/mask/angle_mask.png.import b/render/texture/particle/mask/angle_mask.png.import similarity index 70% rename from render/texture/mask/angle_mask.png.import rename to render/texture/particle/mask/angle_mask.png.import index 49a99d6..7e7c882 100644 --- a/render/texture/mask/angle_mask.png.import +++ b/render/texture/particle/mask/angle_mask.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://wlexfl17167" -path="res://.godot/imported/angle_mask.png-63d0ca414835f5e10cba70f60f51743e.ctex" +path="res://.godot/imported/angle_mask.png-e3dc120f638808da9bc6fb2f2aa58737.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/angle_mask.png" -dest_files=["res://.godot/imported/angle_mask.png-63d0ca414835f5e10cba70f60f51743e.ctex"] +source_file="res://render/texture/particle/mask/angle_mask.png" +dest_files=["res://.godot/imported/angle_mask.png-e3dc120f638808da9bc6fb2f2aa58737.ctex"] [params] diff --git a/render/texture/mask/mask1.png b/render/texture/particle/mask/mask1.png similarity index 100% rename from render/texture/mask/mask1.png rename to render/texture/particle/mask/mask1.png diff --git a/render/texture/mask/mask1.png.import b/render/texture/particle/mask/mask1.png.import similarity index 71% rename from render/texture/mask/mask1.png.import rename to render/texture/particle/mask/mask1.png.import index c9362c0..2442808 100644 --- a/render/texture/mask/mask1.png.import +++ b/render/texture/particle/mask/mask1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c1nrboeh88fwt" -path="res://.godot/imported/mask1.png-4f11c099a8e93c4a50e5b5109793ca51.ctex" +path="res://.godot/imported/mask1.png-64543d049979ee1409cfa09d885af493.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask1.png" -dest_files=["res://.godot/imported/mask1.png-4f11c099a8e93c4a50e5b5109793ca51.ctex"] +source_file="res://render/texture/particle/mask/mask1.png" +dest_files=["res://.godot/imported/mask1.png-64543d049979ee1409cfa09d885af493.ctex"] [params] diff --git a/render/texture/mask/mask2.png b/render/texture/particle/mask/mask2.png similarity index 100% rename from render/texture/mask/mask2.png rename to render/texture/particle/mask/mask2.png diff --git a/render/texture/mask/mask2.png.import b/render/texture/particle/mask/mask2.png.import similarity index 71% rename from render/texture/mask/mask2.png.import rename to render/texture/particle/mask/mask2.png.import index faf980f..2efb67d 100644 --- a/render/texture/mask/mask2.png.import +++ b/render/texture/particle/mask/mask2.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cnnhlvmrbdhjf" -path="res://.godot/imported/mask2.png-add4f7f83d4a993f4cd8cd597517bf25.ctex" +path="res://.godot/imported/mask2.png-8a2ba3849d464090b4d132d45dd7d13e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask2.png" -dest_files=["res://.godot/imported/mask2.png-add4f7f83d4a993f4cd8cd597517bf25.ctex"] +source_file="res://render/texture/particle/mask/mask2.png" +dest_files=["res://.godot/imported/mask2.png-8a2ba3849d464090b4d132d45dd7d13e.ctex"] [params] diff --git a/render/texture/mask/mask3.png b/render/texture/particle/mask/mask3.png similarity index 100% rename from render/texture/mask/mask3.png rename to render/texture/particle/mask/mask3.png diff --git a/render/texture/mask/mask3.png.import b/render/texture/particle/mask/mask3.png.import similarity index 74% rename from render/texture/mask/mask3.png.import rename to render/texture/particle/mask/mask3.png.import index fde5999..d9e679f 100644 --- a/render/texture/mask/mask3.png.import +++ b/render/texture/particle/mask/mask3.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bgc7ni6f5e8si" -path="res://.godot/imported/mask3.png-03d81c5ec5ed19ed517e8bead41bdfae.ctex" +path="res://.godot/imported/mask3.png-21d0121b8efa44304bafb6439acf83f9.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask3.png" -dest_files=["res://.godot/imported/mask3.png-03d81c5ec5ed19ed517e8bead41bdfae.ctex"] +source_file="res://render/texture/particle/mask/mask3.png" +dest_files=["res://.godot/imported/mask3.png-21d0121b8efa44304bafb6439acf83f9.ctex"] [params] diff --git a/render/texture/mask/mask4.png b/render/texture/particle/mask/mask4.png similarity index 100% rename from render/texture/mask/mask4.png rename to render/texture/particle/mask/mask4.png diff --git a/render/texture/mask/mask4.png.import b/render/texture/particle/mask/mask4.png.import similarity index 71% rename from render/texture/mask/mask4.png.import rename to render/texture/particle/mask/mask4.png.import index ab5def5..76c62f8 100644 --- a/render/texture/mask/mask4.png.import +++ b/render/texture/particle/mask/mask4.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b2s7805jh3khd" -path="res://.godot/imported/mask4.png-c62deed2b9e46b22194482ef8631e116.ctex" +path="res://.godot/imported/mask4.png-d8ec7f7cc4ad158b0a8f35672dda6d90.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask4.png" -dest_files=["res://.godot/imported/mask4.png-c62deed2b9e46b22194482ef8631e116.ctex"] +source_file="res://render/texture/particle/mask/mask4.png" +dest_files=["res://.godot/imported/mask4.png-d8ec7f7cc4ad158b0a8f35672dda6d90.ctex"] [params] diff --git a/render/texture/mask/mask5.png b/render/texture/particle/mask/mask5.png similarity index 100% rename from render/texture/mask/mask5.png rename to render/texture/particle/mask/mask5.png diff --git a/render/texture/mask/mask5.png.import b/render/texture/particle/mask/mask5.png.import similarity index 71% rename from render/texture/mask/mask5.png.import rename to render/texture/particle/mask/mask5.png.import index 7371724..63c0597 100644 --- a/render/texture/mask/mask5.png.import +++ b/render/texture/particle/mask/mask5.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cksxjvafx2skm" -path="res://.godot/imported/mask5.png-01df40eb2cfeb741fda691b6a0a708d7.ctex" +path="res://.godot/imported/mask5.png-8765853061ca062277d768e2dd680970.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask5.png" -dest_files=["res://.godot/imported/mask5.png-01df40eb2cfeb741fda691b6a0a708d7.ctex"] +source_file="res://render/texture/particle/mask/mask5.png" +dest_files=["res://.godot/imported/mask5.png-8765853061ca062277d768e2dd680970.ctex"] [params] diff --git a/render/texture/mask/mask6.png b/render/texture/particle/mask/mask6.png similarity index 100% rename from render/texture/mask/mask6.png rename to render/texture/particle/mask/mask6.png diff --git a/render/texture/mask/mask6.png.import b/render/texture/particle/mask/mask6.png.import similarity index 71% rename from render/texture/mask/mask6.png.import rename to render/texture/particle/mask/mask6.png.import index 064bc25..e854d94 100644 --- a/render/texture/mask/mask6.png.import +++ b/render/texture/particle/mask/mask6.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://csjm7d1tg6b50" -path="res://.godot/imported/mask6.png-bfc308add2dfa12fcdf95a205d0d505a.ctex" +path="res://.godot/imported/mask6.png-c44f052796453975f97df43324008e41.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/mask/mask6.png" -dest_files=["res://.godot/imported/mask6.png-bfc308add2dfa12fcdf95a205d0d505a.ctex"] +source_file="res://render/texture/particle/mask/mask6.png" +dest_files=["res://.godot/imported/mask6.png-c44f052796453975f97df43324008e41.ctex"] [params] diff --git a/render/texture/noise/noise1.png b/render/texture/particle/noise/noise1.png similarity index 100% rename from render/texture/noise/noise1.png rename to render/texture/particle/noise/noise1.png diff --git a/render/texture/noise/noise1.png.import b/render/texture/particle/noise/noise1.png.import similarity index 71% rename from render/texture/noise/noise1.png.import rename to render/texture/particle/noise/noise1.png.import index 6a3df85..1df5b5e 100644 --- a/render/texture/noise/noise1.png.import +++ b/render/texture/particle/noise/noise1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c4byf37he3mjt" -path="res://.godot/imported/noise1.png-f693e43e5a0783b64c9b218416eadc51.ctex" +path="res://.godot/imported/noise1.png-224d9020dcb85a6843564370cbfd661e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/noise/noise1.png" -dest_files=["res://.godot/imported/noise1.png-f693e43e5a0783b64c9b218416eadc51.ctex"] +source_file="res://render/texture/particle/noise/noise1.png" +dest_files=["res://.godot/imported/noise1.png-224d9020dcb85a6843564370cbfd661e.ctex"] [params] diff --git a/render/texture/noise/noise2.png b/render/texture/particle/noise/noise2.png similarity index 100% rename from render/texture/noise/noise2.png rename to render/texture/particle/noise/noise2.png diff --git a/render/texture/noise/noise2.png.import b/render/texture/particle/noise/noise2.png.import similarity index 71% rename from render/texture/noise/noise2.png.import rename to render/texture/particle/noise/noise2.png.import index 641d188..26c1c62 100644 --- a/render/texture/noise/noise2.png.import +++ b/render/texture/particle/noise/noise2.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dd3e7ol8qa5eq" -path="res://.godot/imported/noise2.png-b12ecd0c48ee15f1133a07b5fcc330f0.ctex" +path="res://.godot/imported/noise2.png-8541980cae4d2e7f0c83830fe819d5c5.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/noise/noise2.png" -dest_files=["res://.godot/imported/noise2.png-b12ecd0c48ee15f1133a07b5fcc330f0.ctex"] +source_file="res://render/texture/particle/noise/noise2.png" +dest_files=["res://.godot/imported/noise2.png-8541980cae4d2e7f0c83830fe819d5c5.ctex"] [params] diff --git a/render/texture/shape/flare.png b/render/texture/particle/shape/flare.png similarity index 100% rename from render/texture/shape/flare.png rename to render/texture/particle/shape/flare.png diff --git a/render/texture/shape/flare.png.import b/render/texture/particle/shape/flare.png.import similarity index 71% rename from render/texture/shape/flare.png.import rename to render/texture/particle/shape/flare.png.import index d2fa420..a20dc6f 100644 --- a/render/texture/shape/flare.png.import +++ b/render/texture/particle/shape/flare.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bb0yfk0u4lqqn" -path="res://.godot/imported/flare.png-3c5c77b68c2b446923833d2d81d06ac1.ctex" +path="res://.godot/imported/flare.png-97e47c07f4cdcd90f4926e0bac2a678f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/flare.png" -dest_files=["res://.godot/imported/flare.png-3c5c77b68c2b446923833d2d81d06ac1.ctex"] +source_file="res://render/texture/particle/shape/flare.png" +dest_files=["res://.godot/imported/flare.png-97e47c07f4cdcd90f4926e0bac2a678f.ctex"] [params] diff --git a/render/texture/particle/shape/glow.png b/render/texture/particle/shape/glow.png new file mode 100644 index 0000000..d0fee86 Binary files /dev/null and b/render/texture/particle/shape/glow.png differ diff --git a/render/texture/particle/shape/glow.png.import b/render/texture/particle/shape/glow.png.import new file mode 100644 index 0000000..039a5de --- /dev/null +++ b/render/texture/particle/shape/glow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b0bmvub81xvmf" +path="res://.godot/imported/glow.png-c1c3cae4dab2d016ddc051279ee33301.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://render/texture/particle/shape/glow.png" +dest_files=["res://.godot/imported/glow.png-c1c3cae4dab2d016ddc051279ee33301.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 diff --git a/render/texture/particle/shape/smoke.png b/render/texture/particle/shape/smoke.png new file mode 100644 index 0000000..194e781 Binary files /dev/null and b/render/texture/particle/shape/smoke.png differ diff --git a/render/texture/particle/shape/smoke.png.import b/render/texture/particle/shape/smoke.png.import new file mode 100644 index 0000000..77c948b --- /dev/null +++ b/render/texture/particle/shape/smoke.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://colhtjt8jon3v" +path="res://.godot/imported/smoke.png-34046474e6118af82d80752acc087514.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://render/texture/particle/shape/smoke.png" +dest_files=["res://.godot/imported/smoke.png-34046474e6118af82d80752acc087514.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 diff --git a/resource/skill_animation/hero01_fist_air_skill01.tres b/resource/skill_animation/hero01_fist_air_skill01.tres index 4740902..5198d7a 100644 --- a/resource/skill_animation/hero01_fist_air_skill01.tres +++ b/resource/skill_animation/hero01_fist_air_skill01.tres @@ -60,7 +60,7 @@ tracks/4/path = NodePath("Status:speed_up_rate") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { -"times": PackedFloat32Array(0.3, 0.7), +"times": PackedFloat32Array(0.2, 0.7), "transitions": PackedFloat32Array(1, 1), "update": 1, "values": [-0.5, -1.0] @@ -72,10 +72,10 @@ tracks/5/path = NodePath("Status:skill_move_speed") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { -"times": PackedFloat32Array(0.2, 0.4), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0, 0.2, 0.4), +"transitions": PackedFloat32Array(1, 1, 1), "update": 1, -"values": [5.0, 0.0] +"values": [0.0, 7.0, 0.0] } tracks/6/type = "method" tracks/6/imported = false @@ -84,10 +84,13 @@ tracks/6/path = NodePath("Battle") tracks/6/interp = 1 tracks/6/loop_wrap = true tracks/6/keys = { -"times": PackedFloat32Array(0.6), -"transitions": PackedFloat32Array(1), +"times": PackedFloat32Array(0.3, 0.4), +"transitions": PackedFloat32Array(1, 1), "values": [{ "args": [], +"method": &"check_ground" +}, { +"args": [], "method": &"attack" }] } @@ -98,10 +101,10 @@ tracks/7/path = NodePath("Status:skill_float_speed") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { -"times": PackedFloat32Array(0.2, 0.2001, 0.4), -"transitions": PackedFloat32Array(1, 1, 1), +"times": PackedFloat32Array(0, 0.2, 0.2001, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), "update": 1, -"values": [-4.0, -4.0, 0.0] +"values": [0.1, -4.0, -7.0, 0.0] } tracks/8/type = "method" tracks/8/imported = false @@ -110,13 +113,13 @@ tracks/8/path = NodePath("Effect") tracks/8/interp = 1 tracks/8/loop_wrap = true tracks/8/keys = { -"times": PackedFloat32Array(0.2, 0.6), +"times": PackedFloat32Array(0.2, 0.4), "transitions": PackedFloat32Array(1, 1), "values": [{ "args": [], "method": &"cast_attack_particle" }, { "args": [], -"method": &"cast_attack_particle" +"method": &"cast_attack_particle_release" }] } diff --git a/scene/character/player.tscn b/scene/character/player.tscn index 34b5653..a16dbee 100644 --- a/scene/character/player.tscn +++ b/scene/character/player.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://8rcvw1vnjcf7" path="res://scene/character/character.tscn" id="1_pot50"] [ext_resource type="Script" path="res://script/character/player/combo.gd" id="2_i44w8"] -[ext_resource type="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="2_rubkv"] +[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="2_q1a6q"] [ext_resource type="Script" path="res://script/character/player/player_input.gd" id="3_n07go"] [ext_resource type="Script" path="res://script/character/player/core.gd" id="3_rxdse"] [ext_resource type="Script" path="res://script/character/player/player_info.gd" id="4_mi1lk"] @@ -12,8 +12,8 @@ [node name="View" parent="." index="2"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.693056, 0) -sprite_frames = ExtResource("2_rubkv") -animation = &"fist_air_skill01" +sprite_frames = ExtResource("2_q1a6q") +animation = &"long_attack01" [node name="Combo" type="Node3D" parent="." index="8"] unique_name_in_owner = true diff --git a/scene/effect/particle/particle_decal_normal.tscn b/scene/effect/particle/particle_decal_normal.tscn index 5576b5b..f448980 100644 --- a/scene/effect/particle/particle_decal_normal.tscn +++ b/scene/effect/particle/particle_decal_normal.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=10 format=3 uid="uid://5d1a3s6x77wd"] [ext_resource type="Script" path="res://script/effect/particle.gd" id="1_2t2j1"] -[ext_resource type="Texture2D" uid="uid://bjv7f83tdgq17" path="res://render/texture/shape/decal_explode.png" id="2_vkpca"] +[ext_resource type="Texture2D" uid="uid://bjv7f83tdgq17" path="res://render/texture/decal/decal_explode.png" id="2_vkpca"] [ext_resource type="Script" path="res://script/effect/particle_decal.gd" id="3_dwi0o"] -[ext_resource type="Texture2D" uid="uid://brgii0qi4s6kb" path="res://render/texture/shape/decal_dust.png" id="4_jxr0h"] -[ext_resource type="Texture2D" uid="uid://dkhmqgtc8tn1t" path="res://render/texture/shape/decal_shockwave.png" id="5_c3jkk"] -[ext_resource type="Texture2D" uid="uid://b6bfacouwy2hi" path="res://render/texture/shape/decal_glow.png" id="6_2la8o"] +[ext_resource type="Texture2D" uid="uid://brgii0qi4s6kb" path="res://render/texture/decal/decal_dust.png" id="4_jxr0h"] +[ext_resource type="Texture2D" uid="uid://dkhmqgtc8tn1t" path="res://render/texture/decal/decal_shockwave.png" id="5_c3jkk"] +[ext_resource type="Texture2D" uid="uid://b6bfacouwy2hi" path="res://render/texture/decal/decal_glow.png" id="6_2la8o"] [sub_resource type="Curve" id="Curve_w5jkx"] max_value = 0.6 diff --git a/scene/effect/particle/particle_hit_normal.tscn b/scene/effect/particle/particle_hit_normal.tscn index 1c16f3d..55198eb 100644 --- a/scene/effect/particle/particle_hit_normal.tscn +++ b/scene/effect/particle/particle_hit_normal.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://io1yfgjm480t"] +[gd_scene load_steps=6 format=3 uid="uid://io1yfgjm480t"] [ext_resource type="Script" path="res://script/effect/particle.gd" id="1_qxvm2"] [ext_resource type="Material" uid="uid://tlhcll6fyp7q" path="res://render/material/effect_hit.tres" id="2_54a52"] @@ -6,6 +6,8 @@ [sub_resource type="QuadMesh" id="QuadMesh_0j7av"] +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_pcbb8"] + [node name="Particle" type="Node3D"] script = ExtResource("1_qxvm2") @@ -20,3 +22,14 @@ fixed_fps = 60 local_coords = true process_material = ExtResource("3_1alqw") draw_pass_1 = SubResource("QuadMesh_0j7av") + +[node name="Smoke" type="GPUParticles3D" parent="."] +visible = false +cast_shadow = 0 +emitting = false +amount = 1 +lifetime = 0.25 +fixed_fps = 60 +local_coords = true +process_material = SubResource("ParticleProcessMaterial_pcbb8") +draw_pass_1 = SubResource("QuadMesh_0j7av") diff --git a/scene/effect/readiness/readiness_bullet.tscn b/scene/effect/readiness/readiness_bullet.tscn index 006328a..3251b86 100644 --- a/scene/effect/readiness/readiness_bullet.tscn +++ b/scene/effect/readiness/readiness_bullet.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://cxj65e7teugyw"] -[ext_resource type="Texture2D" uid="uid://bd7kst3jrrma5" path="res://render/texture/shape/readiness_bullet.png" id="1_30j48"] +[ext_resource type="Texture2D" uid="uid://bd7kst3jrrma5" path="res://render/texture/decal/readiness_bullet.png" id="1_30j48"] [node name="ReadinessHero" type="Decal"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) diff --git a/scene/effect/readiness/readiness_hero.tscn b/scene/effect/readiness/readiness_hero.tscn index 5c806c9..0a9786a 100644 --- a/scene/effect/readiness/readiness_hero.tscn +++ b/scene/effect/readiness/readiness_hero.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://7ej8d4b1lc0v"] -[ext_resource type="Texture2D" uid="uid://dpsxejelj58f8" path="res://render/texture/shape/readiness_hero.png" id="1_msawg"] +[ext_resource type="Texture2D" uid="uid://dpsxejelj58f8" path="res://render/texture/decal/readiness_hero.png" id="1_msawg"] [node name="ReadinessHero" type="Decal"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) diff --git a/scene/effect/readiness/readiness_monster.tscn b/scene/effect/readiness/readiness_monster.tscn index c8213e1..39dd012 100644 --- a/scene/effect/readiness/readiness_monster.tscn +++ b/scene/effect/readiness/readiness_monster.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://64e2u2uedpi1"] -[ext_resource type="Texture2D" uid="uid://xtipei54v35i" path="res://render/texture/shape/readiness_monster.png" id="1_2mpei"] +[ext_resource type="Texture2D" uid="uid://xtipei54v35i" path="res://render/texture/decal/readiness_monster.png" id="1_2mpei"] [node name="ReadinessHero" type="Decal"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) diff --git a/scene/launcher.tscn b/scene/launcher.tscn index c23d81c..a94fcbd 100644 --- a/scene/launcher.tscn +++ b/scene/launcher.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=14 format=3 uid="uid://eoydwrunmm5n"] +[gd_scene load_steps=17 format=3 uid="uid://eoydwrunmm5n"] [ext_resource type="Script" path="res://script/manager/game_manager.gd" id="1_q2t80"] [ext_resource type="Script" path="res://script/manager/level_manager.gd" id="2_ewhkj"] +[ext_resource type="Shader" path="res://render/shader/post_process.gdshader" id="2_iwyj8"] [ext_resource type="Script" path="res://script/_global/stage.gd" id="2_lxgiw"] [ext_resource type="Script" path="res://script/manager/character_manager.gd" id="4_oonkb"] [ext_resource type="Script" path="res://script/manager/camera_manager.gd" id="4_yqiun"] @@ -14,6 +15,18 @@ [ext_resource type="PackedScene" uid="uid://0uonhojhfgi" path="res://scene/ui/menu_screen.tscn" id="10_sky2n"] [ext_resource type="Script" path="res://script/manager/input_manager.gd" id="12_vfqm4"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b4sw2"] +shader = ExtResource("2_iwyj8") +shader_parameter/shift_strength = 0.0 +shader_parameter/blur_strength = 0.0 +shader_parameter/vignette_alpha = 0.347 +shader_parameter/vignette_inner = 0.633 +shader_parameter/vignette_outer = 1.339 + +[sub_resource type="Curve" id="Curve_f8hvs"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.501961, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 3 + [node name="Root" type="Node3D"] [node name="GameManager" type="Node3D" parent="."] @@ -21,6 +34,7 @@ script = ExtResource("1_q2t80") [node name="Stage" type="SubViewportContainer" parent="GameManager"] texture_filter = 2 +material = SubResource("ShaderMaterial_b4sw2") offset_right = 640.0 offset_bottom = 360.0 scale = Vector2(1, 1.414) @@ -45,6 +59,7 @@ size = 7.2 frustum_offset = Vector2(2, 0) far = 20.0 script = ExtResource("4_yqiun") +global_effect_curve = SubResource("Curve_f8hvs") [node name="CharacterManager" type="Node3D" parent="GameManager/Stage/SubViewport"] script = ExtResource("4_oonkb") @@ -52,17 +67,24 @@ script = ExtResource("4_oonkb") [node name="EffectManager" type="Node3D" parent="GameManager/Stage/SubViewport"] script = ExtResource("8_0jv87") +[node name="CSGBox3D" type="CSGBox3D" parent="GameManager/Stage/SubViewport"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.36529, 0) + [node name="UIManager" type="Node3D" parent="GameManager"] process_mode = 3 script = ExtResource("7_wa6ef") [node name="HudScreen" parent="GameManager/UIManager" instance=ExtResource("7_gx646")] +visible = false [node name="StatusScreen" parent="GameManager/UIManager" instance=ExtResource("9_bki0o")] +visible = false [node name="MenuScreen" parent="GameManager/UIManager" instance=ExtResource("10_sky2n")] +visible = false [node name="ProfileScreen" parent="GameManager/UIManager" instance=ExtResource("6_u1fxn")] +visible = false [node name="InputManager" type="Node3D" parent="GameManager"] process_mode = 3 diff --git a/scene/ui/hud_screen.tscn b/scene/ui/hud_screen.tscn index 8fe63f2..287d16e 100644 --- a/scene/ui/hud_screen.tscn +++ b/scene/ui/hud_screen.tscn @@ -11,7 +11,7 @@ [ext_resource type="Texture2D" uid="uid://0f3lam5c3k0y" path="res://resource/ui/hud/player_status_hp.png" id="5_b0cyb"] [ext_resource type="Script" path="res://script/ui/hud/lock_item.gd" id="5_usy8x"] [ext_resource type="Texture2D" uid="uid://g4b4cjfdaxsx" path="res://resource/ui/hud/player_status_mp_sub_empty.png" id="6_fqaaa"] -[ext_resource type="Texture2D" uid="uid://dx2vp753yvh4y" path="res://render/texture/shape/lock.png" id="6_hmslt"] +[ext_resource type="Texture2D" uid="uid://dx2vp753yvh4y" path="res://render/texture/decal/lock.png" id="6_hmslt"] [ext_resource type="Script" path="res://script/ui/hud/weapon_item.gd" id="7_3g1k3"] [ext_resource type="Texture2D" uid="uid://bvuv86ujfaqfx" path="res://resource/ui/hud/player_status_mp_sub.png" id="7_wiq06"] [ext_resource type="Texture2D" uid="uid://bp7cve5pxkvv0" path="res://resource/ui/hud/boss_status_hp_empty.png" id="9_3sg6t"] diff --git a/script/_global/enum.gd b/script/_global/enum.gd index abcd02b..b96dd5e 100644 --- a/script/_global/enum.gd +++ b/script/_global/enum.gd @@ -12,3 +12,5 @@ enum EStance { } enum EBreakLevel {None, Cancel, Jump, Break, Walk} #不可打断 取消技打断 跳跃打断 连招打断 行走打断 enum ECoreType {Free ,Lock, Passive} + +enum EGlobalEffect {CameraSize,CameraShake,ColorShift,Blur} diff --git a/script/_global/global.gd b/script/_global/global.gd index 6f1d03e..2d8a6d7 100644 --- a/script/_global/global.gd +++ b/script/_global/global.gd @@ -1,5 +1,6 @@ extends Node3D +var view_mgr : ViewManager var camera_mgr : CameraManager var character_mgr : CharacterManager var level_mgr : LevelManager diff --git a/script/_global/stage.gd b/script/_global/stage.gd index eb5f896..494a639 100644 --- a/script/_global/stage.gd +++ b/script/_global/stage.gd @@ -1,7 +1,12 @@ extends SubViewportContainer +class_name ViewManager func _ready(): + Global.view_mgr = self var camera = Global.camera_mgr as CameraManager size = camera.stage_size scale = camera.stage_scale position.y = - camera.stage_offset_y + +func set_post_processing(name:String,value:float): + material.set_shader_parameter(name,value) diff --git a/script/character/battle.gd b/script/character/battle.gd index 9044e83..dbf29e0 100644 --- a/script/character/battle.gd +++ b/script/character/battle.gd @@ -172,6 +172,17 @@ func settle(hit_info:HitInfo) -> bool: character_from.add_buff("pause",attack.pause_time) character_to.add_buff("pause",attack.pause_time) + #全局特效 + if is_kill: + Global.camera_mgr.effect_strong() + elif is_break_stun || is_break_stun: + Global.camera_mgr.effect_strong() + elif is_break_skill: + match break_level_sub: + 1:Global.camera_mgr.effect_normal() + 2:Global.camera_mgr.effect_mid() + 3:Global.camera_mgr.effect_strong() + #伤害跳字 character_to.show_hit_damage(damage) @@ -199,3 +210,6 @@ func add_mp(value:float): character.remove_buff("mp_recover") else: character.set_status("mp_sub",mp_sub+value) + +func check_ground(): + skill.on_check_ground() diff --git a/script/character/buff.gd b/script/character/buff.gd index 4c51b4a..c10821e 100644 --- a/script/character/buff.gd +++ b/script/character/buff.gd @@ -145,7 +145,7 @@ func on_start_flash_white(rate):status.flash_white_rate = 1 func on_update_flash_white(rate):status.flash_white_rate = 1 - rate func on_end_flash_white(rate):status.flash_white_rate = 0 -func on_update_shake_x(rate):status.shake_offset = Vector3((sin(rate * PI * 4) - 0.5)*0.02,0,0); +func on_update_shake_x(rate):status.shake_offset = Vector3((sin(rate * PI * 5) - 0.5)*0.06,0,0); func on_end_shake_x(rate):status.shake_offset = Vector3.ZERO func on_start_deformation(rate):status.deformation_rate = 1; diff --git a/script/character/effect.gd b/script/character/effect.gd index 02438ff..b070a34 100644 --- a/script/character/effect.gd +++ b/script/character/effect.gd @@ -15,7 +15,7 @@ var rediness : Decal var is_pause : bool var is_right : bool -func init(type:Enum.ECharacterType,body_scale:Vector3): +func init(type:Enum.ECharacterType ,body_scale:Vector3): match type: Enum.ECharacterType.Player:rediness = readiness_hero.instantiate() Enum.ECharacterType.Monster:rediness = readiness_monster.instantiate() @@ -55,7 +55,12 @@ func cast_image(res:Resource): func cast_after_image():cast_image(afterimage) func cast_corpse():cast_image(corpse) -func cast_attack_particle(): + +func cast_attack_particle():_cast_attack_particle(true) +func cast_attack_particle_release():_cast_attack_particle(false) +func cast_particle(resource:Resource):_cast_particle(resource,false) + +func _cast_attack_particle(is_attach:bool): if !status.skill_cfg: return var attack_particle = status.skill_cfg.get_attack_particle(status.skill_attack_effect_index) @@ -63,21 +68,25 @@ func cast_attack_particle(): if !attack_particle: print("未配置技能攻击特效:",status.skill_cfg.resource_path) return - cast_particle(attack_particle) - -func cast_particle(resource:Resource): + _cast_particle(attack_particle,is_attach) + +func _cast_particle(resource:Resource ,is_attach:bool): if !resource: print("未配置技能特效") return var new_particle = resource.instantiate() as Particle - new_particle.position = status.basic_offset new_particle.name = "particle" var dir = status.skill_dir as Vector2 dir.x = abs(dir.x) var angle = dir.angle_to(Vector2.RIGHT) new_particle.rotation.y = angle if is_right else -angle new_particle.scale.x = abs(new_particle.scale.x) * (1 if is_right else -1) - add_child(new_particle) + if is_attach: + new_particle.position = status.basic_offset + add_child(new_particle) + else: + new_particle.position = character.view_pos() + SignalManager.effect_create.emit(new_particle) func release_effect(): for child in get_children(): diff --git a/script/character/skill.gd b/script/character/skill.gd index 36f0e3d..0b1abc8 100644 --- a/script/character/skill.gd +++ b/script/character/skill.gd @@ -63,5 +63,13 @@ func on_attack_miss(): # 攻击未命中时跳帧 advance(Setting.animation_frame_rate) +func on_check_ground(): + if status.is_on_floor: + # 落地检测成功时跳帧 + advance(Setting.animation_frame_rate) + else: + # 落地检测失败时回退半帧 + seek(current_animation_position - Setting.animation_frame_rate / 2 ,true,true) + func _on_animation_finished(_anim_name): cancel_skill() diff --git a/script/character/view.gd b/script/character/view.gd index ef2c5e9..3fe1500 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -159,11 +159,12 @@ func _update_material(): var material = material_override as ShaderMaterial var material2 = material_override.next_pass as ShaderMaterial var tex = sprite_frames.get_frame_texture(animation,frame) + var deformation_rate = status.deformation_rate * (0.5 if status.is_floating else 0.4) material2.set_shader_parameter("flash_white",status.flash_white_rate) material.set_shader_parameter("deformation_dir",status.deformation_dir) material2.set_shader_parameter("deformation_dir",status.deformation_dir) - material.set_shader_parameter("deformation_rate",status.deformation_rate*0.4) - material2.set_shader_parameter("deformation_rate",status.deformation_rate*0.4) + material.set_shader_parameter("deformation_rate",deformation_rate) + material2.set_shader_parameter("deformation_rate",deformation_rate) material.set_shader_parameter("tex",tex) material2.set_shader_parameter("tex",tex) diff --git a/script/manager/camera_manager.gd b/script/manager/camera_manager.gd index e06f9e3..6b04a84 100644 --- a/script/manager/camera_manager.gd +++ b/script/manager/camera_manager.gd @@ -1,13 +1,17 @@ extends Camera3D class_name CameraManager +@export var global_effect_curve : Curve var target:int +var target_character_pos:Vector2 = Vector2.ZERO var target_pos:Vector2 = Vector2.ZERO var target_pos_y:float var target_pos_now:Vector2 = Vector2.ZERO var level_size:Vector2 var offset:float = 5 +var shake_offset_x:float var camera_limit = Vector3(6.4,1.04,3.6) #x,up,z-downd +var camera_size = 7.2 var basic_size = Vector2(640,360) var scale_y = cos(deg_to_rad(45.0)) * 2.0 #1.414 @@ -18,6 +22,14 @@ var stage_offset_y = (scale_y - 1.0) * 0.5 / sample_rate * stage_size.y var screen_pos_scale = Vector2(sample_rate,sample_rate/scale_y) var screen_pos_offset = Vector2(0,-stage_offset_y) +var global_effect_list = [] + +class GlobalEffect: + var effect_type : Enum.EGlobalEffect + var life_time : float + var life_time_now : float + var value : float + func _ready(): Global.camera_mgr = self SignalManager.character_create.connect(on_character_create) @@ -28,20 +40,42 @@ func _ready(): SignalManager.level_loading_end.connect(on_level_loading_end) func _process(delta): + update_global_effect(delta) + update_camera_pos(delta) + +func update_global_effect(delta): + var remove_list = [] + for global_effect : GlobalEffect in global_effect_list: + global_effect.life_time_now += delta + global_effect.life_time_now = min(global_effect.life_time_now,global_effect.life_time) + if global_effect.life_time_now == global_effect.life_time: + remove_list.append(global_effect) + var rate = global_effect.life_time_now/global_effect.life_time + var value = global_effect_curve.sample(rate)*global_effect.value + match global_effect.effect_type: + Enum.EGlobalEffect.CameraSize:size = camera_size * (1 - 0.2*value);refresh_target_pos() + Enum.EGlobalEffect.CameraShake: shake_offset_x = (sin(rate * PI * 10) - 0.5)*0.04*value + Enum.EGlobalEffect.ColorShift:Global.view_mgr.set_post_processing("shift_strength",value) + Enum.EGlobalEffect.Blur:Global.view_mgr.set_post_processing("blur_strength",value) + for global_effect : GlobalEffect in remove_list: + global_effect_list.erase(global_effect) + +func update_camera_pos(delta): target_pos_lerp(0,delta,5) target_pos_lerp(1,delta,5) - position.x = target_pos_now.x + position.x = target_pos_now.x + shake_offset_x position.z = target_pos_now.y + target_pos_y + offset position.y = target_pos_y + offset func target_pos_lerp(index:int,delta:float,delta_scale:float): - var diff = abs(target_pos_now[index] - target_pos[index]) + var target_pos_real = target_pos + var diff = abs(target_pos_now[index] - target_pos_real[index]) if diff < Setting.pixel_size: - target_pos_now[index] = Util.snap_float(target_pos[index]) + target_pos_now[index] = Util.snap_float(target_pos_real[index]) else: var weight_min = Setting.pixel_size / 2 / diff var weight = max(delta * delta_scale,weight_min) - target_pos_now[index] = lerp(target_pos_now[index], target_pos[index], weight) + target_pos_now[index] = lerp(target_pos_now[index], target_pos_real[index], weight) func on_character_create(id:int,type:int,pos:Vector3): if type == Enum.ECharacterType.Player: @@ -52,16 +86,24 @@ func on_character_create(id:int,type:int,pos:Vector3): func on_character_pos_changed(id:int,pos:Vector3): if id == target: - set_target_pos(pos) + target_character_pos.x = pos.x + target_character_pos.y = pos.z + refresh_target_pos() func on_character_hit_floor(id:int,pos:Vector3): if id == target: target_pos_y = pos.y - set_target_pos(pos) + refresh_target_pos() -func set_target_pos(pos:Vector3): - target_pos.x = clamp(pos.x,camera_limit.x,level_size.x-camera_limit.x) - target_pos.y = clamp(pos.z-target_pos_y,camera_limit.y-target_pos_y,level_size.y-camera_limit.z-target_pos_y) +func refresh_target_pos(): + var pos = target_character_pos + var camera_size_diff = (camera_size - size)/2.0 + var x_min = camera_limit.x - camera_size_diff + var x_max = level_size.x - camera_limit.x + camera_size_diff + var y_min = camera_limit.y - target_pos_y - camera_size_diff + var y_max = level_size.y - camera_limit.z - target_pos_y + camera_size_diff + target_pos.x = clamp(pos.x,x_min,x_max) + target_pos.y = clamp(pos.y-target_pos_y,y_min,y_max) func on_character_destroy(id:int):target = 0 func on_level_size_change(size:Vector2):level_size = size @@ -77,4 +119,35 @@ func get_screen_pos(pos:Vector3) -> Vector2: ret.x += screen_pos_offset.x ret.y += screen_pos_offset.y return ret + +func add_global_effect(effect_type:Enum.EGlobalEffect ,life_time:float ,value:float): + for global_effect : GlobalEffect in global_effect_list: + if global_effect.effect_type == effect_type: + global_effect.life_time = life_time + global_effect.life_time_now = 0 + global_effect.value = value + return + var global_effect = GlobalEffect.new() + global_effect.effect_type = effect_type + global_effect.life_time = life_time + global_effect.life_time_now = 0 + global_effect.value = value + global_effect_list.append(global_effect) + +func effect_normal(): + add_global_effect(Enum.EGlobalEffect.CameraShake,0.2,0.2) + add_global_effect(Enum.EGlobalEffect.CameraSize,0.2,0.02) + add_global_effect(Enum.EGlobalEffect.ColorShift,0.2,0.2) + add_global_effect(Enum.EGlobalEffect.Blur,0.2,0.1) + +func effect_mid(): + add_global_effect(Enum.EGlobalEffect.CameraShake,0.3,0.4) + add_global_effect(Enum.EGlobalEffect.CameraSize,0.3,0.2) + add_global_effect(Enum.EGlobalEffect.ColorShift,0.3,0.4) + add_global_effect(Enum.EGlobalEffect.Blur,0.3,0.4) +func effect_strong(): + add_global_effect(Enum.EGlobalEffect.CameraShake,0.4,0.8) + add_global_effect(Enum.EGlobalEffect.CameraSize,0.4,0.4) + add_global_effect(Enum.EGlobalEffect.ColorShift,0.4,0.8) + add_global_effect(Enum.EGlobalEffect.Blur,0.4,0.8)