diff --git a/config/skill_player_weapon/hero01_fist_air_skill01.tres b/config/skill_player_weapon/hero01_fist_air_skill01.tres new file mode 100644 index 0000000..112ce5e --- /dev/null +++ b/config/skill_player_weapon/hero01_fist_air_skill01.tres @@ -0,0 +1,23 @@ +[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=6 format=3 uid="uid://dkxgra6y2u30l"] + +[ext_resource type="Resource" uid="uid://bsqk3q6mccllg" path="res://config/attack/normal_hit.tres" id="1_h0ykq"] +[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="2_mje6b"] +[ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="3_q461t"] +[ext_resource type="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="4_seudu"] +[ext_resource type="Resource" uid="uid://c6alg8pmqfdxm" path="res://config/weapon/fist.tres" id="5_70pp4"] + +[resource] +script = ExtResource("2_mje6b") +weapon = ExtResource("5_70pp4") +stance_from = 10 +stance_to = 0 +break_level = 3 +action = "attack_heavy" +name = "" +skill_animation = ExtResource("3_q461t") +attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([ExtResource("1_h0ykq")]) +sub_character_list = Array[Resource("res://script/config/character_cfg.gd")]([]) +free_lock = false +refresh_animation = false +sprite_frames = ExtResource("4_seudu") +animation_name = "fist_air_skill01" diff --git a/render/texture/shape/1.py b/render/texture/shape/1.py new file mode 100644 index 0000000..2dc39ea --- /dev/null +++ b/render/texture/shape/1.py @@ -0,0 +1,18 @@ +from PIL import Image + +# Open the image +image = Image.open('decal_shockwave.png') + +# Get the image size +width, height = image.size + +# Modify each pixel's RGBA value +for x in range(width): + for y in range(height): + r, g, b, a = image.getpixel((x, y)) + # Modify the RGBA values here + # For example, invert the colors + image.putpixel((x, y), (255,255,255,r)) + +# Save the modified image +image.save('decal_shockwave.png') \ No newline at end of file diff --git a/render/texture/shape/decal_dust.png b/render/texture/shape/decal_dust.png new file mode 100644 index 0000000..f93cfaa Binary files /dev/null and b/render/texture/shape/decal_dust.png differ diff --git a/render/texture/shape/decal_dust.png.import b/render/texture/shape/decal_dust.png.import new file mode 100644 index 0000000..22b5107 --- /dev/null +++ b/render/texture/shape/decal_dust.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://brgii0qi4s6kb" +path="res://.godot/imported/decal_dust.png-018d105ab63df278ad4deeb5e793a989.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"] + +[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/shape/explodeDecal.png b/render/texture/shape/decal_explode.png similarity index 100% rename from render/texture/shape/explodeDecal.png rename to render/texture/shape/decal_explode.png diff --git a/render/texture/shape/explodeDecal.png.import b/render/texture/shape/decal_explode.png.import similarity index 70% rename from render/texture/shape/explodeDecal.png.import rename to render/texture/shape/decal_explode.png.import index da2918e..99ad2e5 100644 --- a/render/texture/shape/explodeDecal.png.import +++ b/render/texture/shape/decal_explode.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bjv7f83tdgq17" -path="res://.godot/imported/explodeDecal.png-98bda2cf336166681eaff595a5bec12f.ctex" +path="res://.godot/imported/decal_explode.png-469403a7e0538c7d5588ac39ef569a1a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/explodeDecal.png" -dest_files=["res://.godot/imported/explodeDecal.png-98bda2cf336166681eaff595a5bec12f.ctex"] +source_file="res://render/texture/shape/decal_explode.png" +dest_files=["res://.godot/imported/decal_explode.png-469403a7e0538c7d5588ac39ef569a1a.ctex"] [params] diff --git a/render/texture/shape/decal_glow.png b/render/texture/shape/decal_glow.png new file mode 100644 index 0000000..2a7496b Binary files /dev/null and b/render/texture/shape/decal_glow.png differ diff --git a/render/texture/shape/decal_glow.png.import b/render/texture/shape/decal_glow.png.import new file mode 100644 index 0000000..be43738 --- /dev/null +++ b/render/texture/shape/decal_glow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6bfacouwy2hi" +path="res://.godot/imported/decal_glow.png-60e7c65c14d9ba83f9accaada44f46cd.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"] + +[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/shape/decal_shockwave.png b/render/texture/shape/decal_shockwave.png new file mode 100644 index 0000000..0ed333c Binary files /dev/null and b/render/texture/shape/decal_shockwave.png differ diff --git a/render/texture/shape/decal_shockwave.png.import b/render/texture/shape/decal_shockwave.png.import new file mode 100644 index 0000000..56fd8f2 --- /dev/null +++ b/render/texture/shape/decal_shockwave.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkhmqgtc8tn1t" +path="res://.godot/imported/decal_shockwave.png-ff3f5745d48dd37c112ee6075801a729.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"] + +[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/shape/swordDecal.png b/render/texture/shape/decal_sword.png similarity index 100% rename from render/texture/shape/swordDecal.png rename to render/texture/shape/decal_sword.png diff --git a/render/texture/shape/swordDecal.png.import b/render/texture/shape/decal_sword.png.import similarity index 70% rename from render/texture/shape/swordDecal.png.import rename to render/texture/shape/decal_sword.png.import index ea35b7f..c64de72 100644 --- a/render/texture/shape/swordDecal.png.import +++ b/render/texture/shape/decal_sword.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://ceu7b4nuktlgy" -path="res://.godot/imported/swordDecal.png-152ce59ae7b5e48a88a78d43374add4a.ctex" +path="res://.godot/imported/decal_sword.png-ca0e8413a122e9ea54f5877a2e742f7f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://render/texture/shape/swordDecal.png" -dest_files=["res://.godot/imported/swordDecal.png-152ce59ae7b5e48a88a78d43374add4a.ctex"] +source_file="res://render/texture/shape/decal_sword.png" +dest_files=["res://.godot/imported/decal_sword.png-ca0e8413a122e9ea54f5877a2e742f7f.ctex"] [params] diff --git a/resource/animation/character/hero01_fist_skill01.aseprite b/resource/animation/character/hero01_fist_skill01.aseprite index c0c18d1..6efba62 100644 Binary files a/resource/animation/character/hero01_fist_skill01.aseprite and b/resource/animation/character/hero01_fist_skill01.aseprite differ diff --git a/resource/animation/character/hero01_fist_skill01.png b/resource/animation/character/hero01_fist_skill01.png index b37189d..9586b1e 100644 Binary files a/resource/animation/character/hero01_fist_skill01.png and b/resource/animation/character/hero01_fist_skill01.png differ diff --git a/resource/skill_animation/hero01_fist_air_skill01.tres b/resource/skill_animation/hero01_fist_air_skill01.tres new file mode 100644 index 0000000..4740902 --- /dev/null +++ b/resource/skill_animation/hero01_fist_air_skill01.tres @@ -0,0 +1,122 @@ +[gd_resource type="Animation" load_steps=2 format=3 uid="uid://dxgqn5fa7aokj"] + +[ext_resource type="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="1_0ac7k"] + +[resource] +resource_name = "hero01_fist_air_skill01" +length = 0.9 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("View:sprite_frames") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [ExtResource("1_0ac7k")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("View:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": ["fist_air_skill01"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("View:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Status:break_level") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.1, 0.8), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [0, 3, 4] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +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), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [-0.5, -1.0] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +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), +"update": 1, +"values": [5.0, 0.0] +} +tracks/6/type = "method" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Battle") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.6), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"attack" +}] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +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), +"update": 1, +"values": [-4.0, -4.0, 0.0] +} +tracks/8/type = "method" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Effect") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0.2, 0.6), +"transitions": PackedFloat32Array(1, 1), +"values": [{ +"args": [], +"method": &"cast_attack_particle" +}, { +"args": [], +"method": &"cast_attack_particle" +}] +} diff --git a/resource/skill_animation_library/animation_library.tres b/resource/skill_animation_library/animation_library.tres index 6c5304e..e49f3b9 100644 --- a/resource/skill_animation_library/animation_library.tres +++ b/resource/skill_animation_library/animation_library.tres @@ -1,4 +1,4 @@ -[gd_resource type="AnimationLibrary" load_steps=25 format=3 uid="uid://croik07a1qko5"] +[gd_resource type="AnimationLibrary" load_steps=26 format=3 uid="uid://croik07a1qko5"] [ext_resource type="Animation" uid="uid://t01a4jvp8srr" path="res://resource/skill_animation/hero01_fist_attack01.tres" id="1_4bwwm"] [ext_resource type="Animation" uid="uid://p8l0puqxrkwh" path="res://resource/skill_animation/hero01_long_air_attack01.tres" id="1_b46g3"] @@ -16,6 +16,7 @@ [ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="4_36e6x"] [ext_resource type="Animation" uid="uid://6u3dhxly760l" path="res://resource/skill_animation/hero01_fist_attack04.tres" id="4_087em"] [ext_resource type="Animation" uid="uid://dkkqys8el1u6g" path="res://resource/skill_animation/hero01_common_skill02.tres" id="4_vtwy2"] +[ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="5_df32u"] [ext_resource type="Animation" uid="uid://cwm116apu63n1" path="res://resource/skill_animation/hero01_long_flash.tres" id="5_fumom"] [ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"] [ext_resource type="Animation" uid="uid://iprcbf277rf4" path="res://resource/skill_animation/hero01_long_skill02.tres" id="7_ui68j"] @@ -31,6 +32,7 @@ _data = { "hero01_common_skill0102": ExtResource("2_8l02x"), "hero01_common_skill0103": ExtResource("3_ily05"), "hero01_common_skill02": ExtResource("4_vtwy2"), +"hero01_fist_air_skill01": ExtResource("5_df32u"), "hero01_fist_attack01": ExtResource("1_4bwwm"), "hero01_fist_attack02": ExtResource("2_vx7p1"), "hero01_fist_attack03": ExtResource("3_lo6yb"), diff --git a/scene/character/player.tscn b/scene/character/player.tscn index c0b9bd4..34b5653 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://bhsotj76tuovy" path="res://resource/animation/character/hero01_fist_attack.aseprite" id="2_oua0x"] +[ext_resource type="SpriteFrames" uid="uid://cajgs8smbkjan" path="res://resource/animation/character/hero01_fist_skill01.aseprite" id="2_rubkv"] [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_oua0x") -animation = &"fist_attack05" +sprite_frames = ExtResource("2_rubkv") +animation = &"fist_air_skill01" [node name="Combo" type="Node3D" parent="." index="8"] unique_name_in_owner = true diff --git a/scene/effect/afterimage/normal.tscn b/scene/effect/afterimage/normal.tscn index a6abd8c..fdb09df 100644 --- a/scene/effect/afterimage/normal.tscn +++ b/scene/effect/afterimage/normal.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=3 format=3 uid="uid://b12fa5bpdmhms"] +[gd_scene load_steps=2 format=3 uid="uid://b12fa5bpdmhms"] -[ext_resource type="SpriteFrames" uid="uid://cwe8setoi6bd" path="res://resource/animation/character/hero01_move.aseprite" id="1_1twno"] [ext_resource type="Script" path="res://script/effect/afterimage.gd" id="2_grtq1"] -[node name="AfterImage" type="AnimatedSprite3D"] -pixel_size = 0.02 -sprite_frames = ExtResource("1_1twno") -animation = &"idle_loop" +[node name="AfterImage" type="Node3D"] script = ExtResource("2_grtq1") +life_time = 0.2 + +[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."] diff --git a/scene/effect/particle/hero01_fist_air_skill01_0.tscn b/scene/effect/particle/hero01_fist_air_skill01_0.tscn new file mode 100644 index 0000000..a81738b --- /dev/null +++ b/scene/effect/particle/hero01_fist_air_skill01_0.tscn @@ -0,0 +1,5 @@ +[gd_scene load_steps=2 format=3 uid="uid://dfdt6u2dbig3e"] + +[ext_resource type="PackedScene" uid="uid://me2heq5v1c5q" path="res://scene/effect/particle/particle_dash_normal.tscn" id="1_1r02f"] + +[node name="Particle" instance=ExtResource("1_1r02f")] diff --git a/scene/effect/particle/hero01_fist_air_skill01_1.tscn b/scene/effect/particle/hero01_fist_air_skill01_1.tscn new file mode 100644 index 0000000..d2656b6 --- /dev/null +++ b/scene/effect/particle/hero01_fist_air_skill01_1.tscn @@ -0,0 +1,5 @@ +[gd_scene load_steps=2 format=3 uid="uid://ds7mp5l20ypb6"] + +[ext_resource type="PackedScene" uid="uid://5d1a3s6x77wd" path="res://scene/effect/particle/particle_decal_normal.tscn" id="1_tw6qm"] + +[node name="Particle" instance=ExtResource("1_tw6qm")] diff --git a/scene/effect/particle/particle_dash_normal.tscn b/scene/effect/particle/particle_dash_normal.tscn new file mode 100644 index 0000000..ad02941 --- /dev/null +++ b/scene/effect/particle/particle_dash_normal.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=6 format=3 uid="uid://me2heq5v1c5q"] + +[ext_resource type="Script" path="res://script/effect/particle.gd" id="1_5usbn"] +[ext_resource type="Material" uid="uid://dtyosukxpf33d" path="res://render/material/effect_slash.tres" id="2_w7v70"] +[ext_resource type="Material" uid="uid://dubkkji6sm8on" path="res://render/process_material/slash_normal.tres" id="3_uy3s2"] +[ext_resource type="ArrayMesh" uid="uid://dq207a0waxk0j" path="res://render/mesh/slash1.obj" id="4_1ed4g"] +[ext_resource type="Material" uid="uid://bkbuvtya3uk3x" path="res://render/material/effect_skew1.tres" id="5_uwxv5"] + +[node name="Particle" type="Node3D"] +script = ExtResource("1_5usbn") + +[node name="Slash" type="GPUParticles3D" parent="."] +layers = 512 +material_override = ExtResource("2_w7v70") +cast_shadow = 0 +gi_mode = 0 +emitting = false +amount = 1 +lifetime = 0.25 +one_shot = true +speed_scale = 1.5 +fixed_fps = 60 +local_coords = true +process_material = ExtResource("3_uy3s2") +draw_pass_1 = ExtResource("4_1ed4g") + +[node name="Skew1" type="GPUParticles3D" parent="."] +transform = Transform3D(0.99, 0, 0, 0, 0.99, 0, 0, 0, 0.99, 0, 0, 0) +layers = 512 +material_override = ExtResource("5_uwxv5") +cast_shadow = 0 +gi_mode = 0 +emitting = false +amount = 1 +lifetime = 0.25 +one_shot = true +speed_scale = 1.5 +fixed_fps = 60 +local_coords = true +process_material = ExtResource("3_uy3s2") +draw_pass_1 = ExtResource("4_1ed4g") diff --git a/scene/effect/particle/particle_decal_normal.tscn b/scene/effect/particle/particle_decal_normal.tscn new file mode 100644 index 0000000..5576b5b --- /dev/null +++ b/scene/effect/particle/particle_decal_normal.tscn @@ -0,0 +1,65 @@ +[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="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"] + +[sub_resource type="Curve" id="Curve_w5jkx"] +max_value = 0.6 +_data = [Vector2(0, 0), 0.0, 0.84, 0, 0, Vector2(0.0196078, 0.6), 0.0, 0.0, 0, 0, Vector2(1, 0.6), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="Curve" id="Curve_r6bwy"] +max_value = 1.5 +_data = [Vector2(0, 1.06915), 0.0, 1.4, 0, 0, Vector2(1, 1.5), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="Curve" id="Curve_18e7g"] +min_value = 1.0 +max_value = 2.0 +_data = [Vector2(0, 1), 0.0, 1.4, 0, 0, Vector2(1, 2), 0.0, 0.0, 0, 0] +point_count = 2 + +[node name="Particle" type="Node3D"] +script = ExtResource("1_2t2j1") + +[node name="DecalExplode" type="Decal" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) +size = Vector3(1, 5, 1) +texture_albedo = ExtResource("2_vkpca") +modulate = Color(0, 0, 0, 1) +cull_mask = 1 +script = ExtResource("3_dwi0o") +lifetime = 3.0 +scale_curve = SubResource("Curve_w5jkx") + +[node name="DecalDust" type="Decal" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) +size = Vector3(1, 5, 1) +texture_albedo = ExtResource("4_jxr0h") +cull_mask = 1 +script = ExtResource("3_dwi0o") +lifetime = 0.5 +scale_curve = SubResource("Curve_r6bwy") +rotate = 15 + +[node name="DecalShockwave" type="Decal" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) +size = Vector3(1, 5, 1) +texture_albedo = ExtResource("5_c3jkk") +cull_mask = 1 +script = ExtResource("3_dwi0o") +lifetime = 0.1 +scale_curve = SubResource("Curve_18e7g") + +[node name="DecalGlow" type="Decal" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0) +size = Vector3(1, 5, 1) +texture_albedo = ExtResource("6_2la8o") +cull_mask = 1 +script = ExtResource("3_dwi0o") +lifetime = 0.1 +scale_curve = SubResource("Curve_18e7g") diff --git a/scene/effect/decal/readiness_bullet.tscn b/scene/effect/readiness/readiness_bullet.tscn similarity index 72% rename from scene/effect/decal/readiness_bullet.tscn rename to scene/effect/readiness/readiness_bullet.tscn index f4000a9..006328a 100644 --- a/scene/effect/decal/readiness_bullet.tscn +++ b/scene/effect/readiness/readiness_bullet.tscn @@ -1,9 +1,9 @@ [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_qpapc"] +[ext_resource type="Texture2D" uid="uid://bd7kst3jrrma5" path="res://render/texture/shape/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) size = Vector3(1, 1, 1) -texture_albedo = ExtResource("1_qpapc") +texture_albedo = ExtResource("1_30j48") cull_mask = 1 diff --git a/scene/effect/decal/readiness_hero.tscn b/scene/effect/readiness/readiness_hero.tscn similarity index 72% rename from scene/effect/decal/readiness_hero.tscn rename to scene/effect/readiness/readiness_hero.tscn index 38b381f..5c806c9 100644 --- a/scene/effect/decal/readiness_hero.tscn +++ b/scene/effect/readiness/readiness_hero.tscn @@ -1,9 +1,9 @@ [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_gkbai"] +[ext_resource type="Texture2D" uid="uid://dpsxejelj58f8" path="res://render/texture/shape/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) size = Vector3(1, 1, 1) -texture_albedo = ExtResource("1_gkbai") +texture_albedo = ExtResource("1_msawg") cull_mask = 1 diff --git a/scene/effect/decal/readiness_monster.tscn b/scene/effect/readiness/readiness_monster.tscn similarity index 100% rename from scene/effect/decal/readiness_monster.tscn rename to scene/effect/readiness/readiness_monster.tscn diff --git a/script/character/effect.gd b/script/character/effect.gd index 9ea0fb3..02438ff 100644 --- a/script/character/effect.gd +++ b/script/character/effect.gd @@ -3,9 +3,9 @@ class_name Effect @onready var afterimage = preload("res://scene/effect/afterimage/normal.tscn") @onready var corpse = preload("res://scene/effect/afterimage/normal.tscn") -@onready var readiness_hero = preload("res://scene/effect/decal/readiness_hero.tscn") -@onready var readiness_monster = preload("res://scene/effect/decal/readiness_monster.tscn") -@onready var readiness_bullet = preload("res://scene/effect/decal/readiness_bullet.tscn") +@onready var readiness_hero = preload("res://scene/effect/readiness/readiness_hero.tscn") +@onready var readiness_monster = preload("res://scene/effect/readiness/readiness_monster.tscn") +@onready var readiness_bullet = preload("res://scene/effect/readiness/readiness_bullet.tscn") @onready var character = (get_owner() as Character) @onready var view = (%View as View) @@ -50,7 +50,7 @@ func cast_image(res:Resource): new_afterimage.position = character.view_pos() new_afterimage.name = "afterimage" new_afterimage.velocity = character.velocity / 4 - view.clone(new_afterimage) + new_afterimage.target = view SignalManager.effect_create.emit(new_afterimage) func cast_after_image():cast_image(afterimage) @@ -59,6 +59,7 @@ func cast_attack_particle(): if !status.skill_cfg: return var attack_particle = status.skill_cfg.get_attack_particle(status.skill_attack_effect_index) + status.skill_attack_effect_index += 1 if !attack_particle: print("未配置技能攻击特效:",status.skill_cfg.resource_path) return @@ -68,7 +69,7 @@ func cast_particle(resource:Resource): if !resource: print("未配置技能特效") return - var new_particle = resource.instantiate() as Particle + var new_particle = resource.instantiate() as Particle new_particle.position = status.basic_offset new_particle.name = "particle" var dir = status.skill_dir as Vector2 diff --git a/script/character/view.gd b/script/character/view.gd index a09eef9..227fe41 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -163,13 +163,6 @@ func _update_material(): material.set_shader_parameter("tex",tex) material2.set_shader_parameter("tex",tex) -func clone(target:AnimatedSprite3D): - target.sprite_frames = sprite_frames - target.animation = animation - target.frame = frame - target.frame_progress = frame_progress - target.scale.x = scale.x - func play_animation(animation_name:String): if not sprite_frames.has_animation(animation_name): return diff --git a/script/effect/afterimage.gd b/script/effect/afterimage.gd index b5ca10d..53a265e 100644 --- a/script/effect/afterimage.gd +++ b/script/effect/afterimage.gd @@ -1,22 +1,20 @@ -extends AnimatedSprite3D +extends EffectBase class_name Afterimage -@export var duration_max:float = 0.2 -@export var is_moving:bool = true +@export var is_moving : bool = true +@onready var image = $AnimatedSprite3D as AnimatedSprite3D +var velocity : Vector3 +var target : AnimatedSprite3D -var duration:float -var velocity:Vector3 - -func _ready(): - duration = duration_max - -func _process(delta): +func on_ready(): + image.sprite_frames = target.sprite_frames + image.animation = target.animation + image.frame = target.frame + image.frame_progress = target.frame_progress + image.scale.x = target.scale.x + image.pixel_size = Setting.pixel_size + +func on_process(delta): if is_moving: position += velocity*delta - - var rate = duration / duration_max - modulate.a = rate - - duration-=delta - if duration<=0: - queue_free() + image.modulate.a = rate diff --git a/script/effect/effect_base.gd b/script/effect/effect_base.gd new file mode 100644 index 0000000..9628d71 --- /dev/null +++ b/script/effect/effect_base.gd @@ -0,0 +1,29 @@ +extends Node3D +class_name EffectBase + +@export var life_time : float = 1 +var life_time_now : float +var is_pause : bool = false +var rate : float + +func _ready(): + life_time_now = life_time + on_ready() + +func _process(delta): + if is_pause: + return + life_time_now -= delta + if life_time_now <= 0: + queue_free() + return + rate = life_time_now / life_time + on_process(delta) + +func set_pause(is_pause_set:bool): + is_pause = is_pause_set + on_set_pause(is_pause_set) + +func on_ready():pass +func on_process(delta:float):pass +func on_set_pause(is_pause_set:bool):pass diff --git a/script/effect/particle.gd b/script/effect/particle.gd index c3690b6..79c44ca 100644 --- a/script/effect/particle.gd +++ b/script/effect/particle.gd @@ -1,31 +1,33 @@ -extends Node3D +extends EffectBase class_name Particle -var life_time : float -var is_pause : bool = false var particle_list : Array[GPUParticles3D] var speed_scale_list = [] +var decal_list = [] -func _ready(): +func on_ready(): for child in get_children(): if child is GPUParticles3D: var particle = child as GPUParticles3D particle_list.append(particle) speed_scale_list.append(particle.speed_scale) + particle.restart() + elif child is ParticleDecal: + decal_list.append(child) + else: + continue + if child.lifetime > life_time_now: + life_time_now = child.lifetime + for particle : GPUParticles3D in particle_list: - if particle.lifetime > life_time: - life_time = particle.lifetime - particle.restart() + if particle.lifetime > life_time_now: + life_time_now = particle.lifetime -func _process(delta): - if is_pause: - return - life_time -= delta - if life_time <= 0: - queue_free() +func on_process(delta:float): + for decal : ParticleDecal in decal_list: + decal.on_process(delta) -func set_pause(is_pause_set:bool): - is_pause = is_pause_set +func on_set_pause(is_pause_set:bool): for i in range(len(particle_list)): var particle = particle_list[i] var speed_scale = speed_scale_list[i] diff --git a/script/effect/particle_decal.gd b/script/effect/particle_decal.gd new file mode 100644 index 0000000..80849e2 --- /dev/null +++ b/script/effect/particle_decal.gd @@ -0,0 +1,30 @@ +extends Decal +class_name ParticleDecal + +@export var lifetime : float = 1 +@export var gradient : Gradient +@export var scale_curve : Curve +@export var rotate : int + +var lifetime_now : float + +func on_process(delta:float): + lifetime_now += delta + var rate = lifetime_now / lifetime + if rate > 1: + return + + #色带 + if gradient: + modulate = gradient.sample(rate) + else: + modulate.a = 1 - rate + + #缩放曲线 + if scale_curve: + var scale_sample = scale_curve.sample(rate) + scale = Vector3(scale_sample,1,scale_sample) + + #旋转 + rotation_degrees.y = rotate * rate +