From 159389c908f80c4981515c46e46d297cdbdf34bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Thu, 25 Sep 2025 21:57:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8=E7=B3=BB=E7=BB=9F):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=83=E9=AD=82=E6=AD=A6=E5=99=A8=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加七魂武器系统,包括: - 七魂武器脚本和场景 - 灵魂子弹脚本和场景 - 相关图片资源和音效 - 修改公鸡角色的武器配置 - 修复子弹基础类的UI状态检测问题 --- components/Bullets/SevenSoul.tscn | 18 ++++++ components/Bullets/SoulBall.tscn | 57 ++++++++++++++++++ components/Characters/Rooster.tscn | 16 ++--- components/Weapons/SevenSoul.tscn | 27 +++++++++ resources/bullets/seven-soul/soul-red.png | Bin 0 -> 4266 bytes .../bullets/seven-soul/soul-red.png.import | 34 +++++++++++ resources/bullets/seven-soul/soul.png | Bin 0 -> 4270 bytes resources/bullets/seven-soul/soul.png.import | 34 +++++++++++ scripts/Contents/Bullets/SevenSoul.gd | 25 ++++++++ scripts/Contents/Bullets/SoulBall.gd | 4 ++ scripts/Contents/Weapons/SevenSoul.gd | 10 +++ scripts/Statemachine/BulletBase.gd | 1 + 12 files changed, 216 insertions(+), 10 deletions(-) create mode 100644 components/Bullets/SevenSoul.tscn create mode 100644 components/Bullets/SoulBall.tscn create mode 100644 components/Weapons/SevenSoul.tscn create mode 100644 resources/bullets/seven-soul/soul-red.png create mode 100644 resources/bullets/seven-soul/soul-red.png.import create mode 100644 resources/bullets/seven-soul/soul.png create mode 100644 resources/bullets/seven-soul/soul.png.import create mode 100644 scripts/Contents/Bullets/SevenSoul.gd create mode 100644 scripts/Contents/Bullets/SoulBall.gd create mode 100644 scripts/Contents/Weapons/SevenSoul.gd diff --git a/components/Bullets/SevenSoul.tscn b/components/Bullets/SevenSoul.tscn new file mode 100644 index 0000000..bdad83e --- /dev/null +++ b/components/Bullets/SevenSoul.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=4 format=3 uid="uid://bymprh2qel2oj"] + +[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_c4fl5"] +[ext_resource type="Script" path="res://scripts/Contents/Bullets/SevenSoul.gd" id="2_egs34"] +[ext_resource type="Texture2D" uid="uid://wy10fc3bqppg" path="res://resources/bullets/seven-soul/soul.png" id="2_itucu"] + +[node name="SevenSoul" instance=ExtResource("1_c4fl5")] +script = ExtResource("2_egs34") +lifeTime = 10000.0 + +[node name="heart" type="Sprite2D" parent="texture" index="1"] +unique_name_in_owner = true +position = Vector2(100, 0) +scale = Vector2(1.5, 1.5) +texture = ExtResource("2_itucu") + +[node name="hitbox" parent="." index="1"] +disabled = true diff --git a/components/Bullets/SoulBall.tscn b/components/Bullets/SoulBall.tscn new file mode 100644 index 0000000..b566464 --- /dev/null +++ b/components/Bullets/SoulBall.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=10 format=3 uid="uid://lwmu85w7c0d4"] + +[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_1gpjv"] +[ext_resource type="Script" path="res://scripts/Contents/Bullets/SoulBall.gd" id="2_eaa43"] +[ext_resource type="Texture2D" uid="uid://b8w31dkev8nc8" path="res://resources/bullets/seven-soul/soul-red.png" id="2_fmlef"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_5be2f"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_fmlef") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[sub_resource type="Curve" id="Curve_fxg5q"] +_data = [Vector2(0, 0.75), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_5wobk"] +curve = SubResource("Curve_fxg5q") + +[sub_resource type="Curve" id="Curve_orogq"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.5), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_pftyf"] +curve = SubResource("Curve_orogq") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_vwon6"] +particle_flag_disable_z = true +direction = Vector3(-1, 0, 0) +spread = 0.0 +gravity = Vector3(0, 0, 0) +scale_curve = SubResource("CurveTexture_pftyf") +alpha_curve = SubResource("CurveTexture_5wobk") + +[node name="SoulBall" instance=ExtResource("1_1gpjv")] +script = ExtResource("2_eaa43") +displayName = "灵魂" +speed = 25.0 +damage = 1.5 +lifeTime = 1000.0 + +[node name="texture" parent="." index="0"] +sprite_frames = SubResource("SpriteFrames_5be2f") + +[node name="trail" type="GPUParticles2D" parent="texture" index="1"] +amount = 10 +process_material = SubResource("ParticleProcessMaterial_vwon6") +texture = ExtResource("2_fmlef") +lifetime = 0.5 + +[node name="hitbox" parent="." index="1"] +visible = false diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 01e99a9..89801d9 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -1,13 +1,12 @@ -[gd_scene load_steps=17 format=3 uid="uid://bm7ymrri6pykb"] +[gd_scene load_steps=16 format=3 uid="uid://bm7ymrri6pykb"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] [ext_resource type="Texture2D" uid="uid://fn8qx72clh38" path="res://resources/characters/cock/rooster-a.svg" id="2_q0j6j"] [ext_resource type="AudioStream" uid="uid://dclinyhu256xi" path="res://resources/sounds/effect/Low Whoosh.mp3" id="3_4syso"] +[ext_resource type="PackedScene" uid="uid://c5y4g70evwy46" path="res://components/Weapons/SevenSoul.tscn" id="3_6e3s5"] [ext_resource type="Texture2D" uid="uid://ci2ik43ce82uy" path="res://resources/characters/cock/rooster-b.svg" id="3_b0fgx"] -[ext_resource type="PackedScene" uid="uid://b2qhes4apaxsj" path="res://components/Weapons/NuclearBomb.tscn" id="3_eikw3"] [ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_ms5sq"] -[ext_resource type="PackedScene" uid="uid://frwt0fgrpskb" path="res://components/Weapons/Meowmere.tscn" id="3_pbssk"] [ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"] [ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] @@ -47,16 +46,13 @@ displayName = "公鸡" [node name="weaponStore" parent="." index="0"] process_mode = 4 -[node name="NuclearBomb" parent="weaponStore" index="0" instance=ExtResource("3_eikw3")] -offset_bottom = 352.0 +[node name="SevenSoul" parent="weaponStore" index="0" instance=ExtResource("3_6e3s5")] +offset_bottom = 330.0 -[node name="Meowmere" parent="weaponStore" index="1" instance=ExtResource("3_pbssk")] -offset_bottom = 374.0 - -[node name="PurpleCrystal" parent="weaponStore" index="2" instance=ExtResource("3_ms5sq")] +[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("3_ms5sq")] debugRebuild = false -[node name="VectorStar" parent="weaponStore" index="3" instance=ExtResource("6_fvy5n")] +[node name="VectorStar" parent="weaponStore" index="2" instance=ExtResource("6_fvy5n")] debugRebuild = false [node name="sprint" parent="sounds" index="0"] diff --git a/components/Weapons/SevenSoul.tscn b/components/Weapons/SevenSoul.tscn new file mode 100644 index 0000000..4b73f36 --- /dev/null +++ b/components/Weapons/SevenSoul.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=4 format=3 uid="uid://c5y4g70evwy46"] + +[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_0f84s"] +[ext_resource type="Script" path="res://scripts/Contents/Weapons/SevenSoul.gd" id="2_n7gtb"] +[ext_resource type="Texture2D" uid="uid://b8w31dkev8nc8" path="res://resources/bullets/seven-soul/soul-red.png" id="4_a4r2b"] + +[node name="SevenSoul" instance=ExtResource("1_0f84s")] +script = ExtResource("2_n7gtb") +avatarTexture = ExtResource("4_a4r2b") +displayName = "人类灵魂" +typeTopic = 3 +store = { +"atk": 2 +} +descriptionTemplate = "召唤7条人类灵魂,每条以10Hz的频率造成$atk点伤害。" +cooldown = 2000.0 +debugRebuild = true + +[node name="avatar" parent="container/info" index="0"] +texture = ExtResource("4_a4r2b") + +[node name="name" parent="container/info" index="2"] +displayName = "人类灵魂" +typeTopic = 3 + +[node name="description" parent="container" index="2"] +text = "[center]召唤7条人类灵魂,每条以10Hz的频率造成[color=cyan]2[/color]→[color=yellow]10[/color]点伤害。[/center]" diff --git a/resources/bullets/seven-soul/soul-red.png b/resources/bullets/seven-soul/soul-red.png new file mode 100644 index 0000000000000000000000000000000000000000..433095bd618387824e209ebab5734e591b265025 GIT binary patch literal 4266 zcmeHKeQ*dERI8ZVoJ8GTnHs5kZjYz6#F@c%PwNc~ju;yxsv0-j3G?L+T1H zjV5I&BE|r!)+GT7GGYWlG9SbPrB@wA^IChG-C0==x;u(e&o2I|_i*`%&5y;7cV-{L zy587hKf)FjRIQdvip^`(-Kcx=j-qT!s>p%ngOyBuDA16Z8w$VZ%Q|;cXpo5`2lfUsd|svdg==V$=V>6 zl?8ldWy2Z4Ja*l?-Boe)H-+uhmCux%%ug*mw{0(b%Ihs$I%~_Cy|2z%RZG79&9ukq zqGHq5hMKmv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