From e74414b53bb44de7f14363e9c7d63c23a0391455 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: Sat, 24 Jan 2026 08:34:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=92=E8=89=B2):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=B0=8F=E9=B8=A1=E5=92=8C=E5=85=AC=E9=B8=A1=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=8F=8A=E6=AD=A6=E5=99=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改小鸡角色的攻击冷却时间和激光数量范围 - 更新公鸡角色的武器为紫色水晶 - 调整小鸡角色的贴图、碰撞体积和位置参数 - 修改初始波数设置,开发环境从10开始 --- components/Characters/Chick.tscn | 57 +++++++++++++++------------- components/Characters/Rooster.tscn | 7 ++-- scripts/Contents/Characters/Chick.gd | 10 ++--- scripts/Contents/Wave.gd | 2 +- 4 files changed, 39 insertions(+), 37 deletions(-) diff --git a/components/Characters/Chick.tscn b/components/Characters/Chick.tscn index 2771c79..36ec7a5 100644 --- a/components/Characters/Chick.tscn +++ b/components/Characters/Chick.tscn @@ -1,15 +1,17 @@ -[gd_scene load_steps=13 format=3 uid="uid://b0ncrvm8u4pox"] +[gd_scene load_steps=14 format=3 uid="uid://b0ncrvm8u4pox"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_goqmy"] [ext_resource type="Script" uid="uid://b2gg1fh0bflu7" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"] +[ext_resource type="AudioStream" uid="uid://b7pxuov1id0ho" path="res://resources/sounds/effect/Pew.mp3" id="3_w0sit"] [ext_resource type="AudioStream" uid="uid://bgo8p1l77xrbe" path="res://resources/sounds/effect/Magic Spell.wav" id="4_2qabh"] [ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="4_mrsne"] [ext_resource type="AudioStream" uid="uid://bf34p3xnsosgj" path="res://resources/sounds/effect/Dun Dun Dunnn.wav" id="4_w0sit"] [ext_resource type="AudioStream" uid="uid://cee6rxv2uqynh" path="res://resources/sounds/effect/Flame.ogg" id="5_vcsbb"] [ext_resource type="AudioStream" uid="uid://dn6bijr513wyp" path="res://resources/sounds/effect/Drum Boing.wav" id="7_qjhwc"] -[ext_resource type="Texture2D" uid="uid://k0hcr5u2xlk6" path="res://resources/characters/chick/fox.png" id="8_k8ox8"] +[ext_resource type="Texture2D" uid="uid://7pkplcqqxvnp" path="res://resources/characters/chick/chick-a.svg" id="8_x766l"] +[ext_resource type="Texture2D" uid="uid://dj5dvqb8gsedr" path="res://resources/characters/chick/chick-b.svg" id="9_w0sit"] -[sub_resource type="SpriteFrames" id="SpriteFrames_xji3d"] +[sub_resource type="SpriteFrames" id="SpriteFrames_k8ox8"] animations = [{ "frames": [], "loop": true, @@ -22,11 +24,11 @@ animations = [{ "speed": 5.0 }] -[sub_resource type="SpriteFrames" id="SpriteFrames_x766l"] +[sub_resource type="SpriteFrames" id="SpriteFrames_17ekt"] animations = [{ "frames": [{ "duration": 1.0, -"texture": ExtResource("8_k8ox8") +"texture": ExtResource("8_x766l") }], "loop": true, "name": &"idle", @@ -34,26 +36,31 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": ExtResource("8_k8ox8") +"texture": ExtResource("8_x766l") +}, { +"duration": 1.0, +"texture": ExtResource("9_w0sit") }], "loop": true, "name": &"walk", "speed": 5.0 }] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_x766l"] -size = Vector2(57, 114) - -[sub_resource type="CircleShape2D" id="CircleShape2D_w0sit"] -radius = 61.03278 +[sub_resource type="CircleShape2D" id="CircleShape2D_x766l"] +radius = 106.66888 [node name="Chick" instance=ExtResource("1_goqmy")] script = ExtResource("2_r6bub") isBoss = true -displayName = "狐狸" +displayName = "小鸡" drops = Array[int]([0, 1]) dropCounts = Array[Vector2]([Vector2(15, 30), Vector2(20, 40)]) appleCount = Vector2i(2, 4) +useStatic = true +hurtAudioRate = 0.2 + +[node name="hurt" parent="sounds" index="3"] +stream = ExtResource("3_w0sit") [node name="attack1" type="AudioStreamPlayer2D" parent="sounds" index="6"] stream = ExtResource("4_mrsne") @@ -74,32 +81,28 @@ volume_db = 10.0 [node name="texture" parent="." index="3"] position = Vector2(0, -37) -sprite_frames = SubResource("SpriteFrames_xji3d") -animation = &"walk" +sprite_frames = SubResource("SpriteFrames_k8ox8") [node name="staticAnimation" parent="texture" index="1"] -position = Vector2(0, -94) -scale = Vector2(0.72807497, 0.72807497) -sprite_frames = SubResource("SpriteFrames_x766l") +position = Vector2(0, -74) +scale = Vector2(3, 3) +sprite_frames = SubResource("SpriteFrames_17ekt") animation = &"idle" +frame_progress = 0.3176048 [node name="hitbox" parent="texture/hurtbox" index="0"] -position = Vector2(-0.5, -113) -shape = SubResource("RectangleShape2D_x766l") - -[node name="hitbox2" type="CollisionShape2D" parent="texture/hurtbox" index="1"] -position = Vector2(117, -149) -shape = SubResource("CircleShape2D_w0sit") +position = Vector2(-0.5, -67) +shape = SubResource("CircleShape2D_x766l") [node name="normal" type="Node2D" parent="texture/weapons" index="0"] -position = Vector2(134, -130) +position = Vector2(93, -113) [node name="foot" type="Node2D" parent="texture/weapons" index="1"] -position = Vector2(56, 28) +position = Vector2(-8, 30) [node name="trailParticle" parent="texture" index="7"] -position = Vector2(1, -107) +position = Vector2(-84, -72) [node name="statebar" parent="." index="4" node_paths=PackedStringArray("entity")] -position = Vector2(0, -227) +position = Vector2(0, -236) entity = NodePath("..") diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 9792d84..789c4f1 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] -[ext_resource type="PackedScene" uid="uid://yq7vmijwvgx1" path="res://components/Weapons/AcidWind.tscn" id="3_da2ca"] +[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_da2ca"] [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"] @@ -58,8 +58,7 @@ metadata/_edit_vertical_guides_ = [71.0] [node name="weaponStore" parent="." index="1"] process_mode = 4 -[node name="AcidWind" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")] -debugRebuild = false +[node name="PurpleCrystal" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")] [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") @@ -88,7 +87,7 @@ position = Vector2(8, -28) shape = SubResource("CircleShape2D_h1v0q") [node name="normal" type="Node2D" parent="texture/weapons" index="0"] -position = Vector2(54, -45) +position = Vector2(56, -69) [node name="statebar" parent="." index="4" node_paths=PackedStringArray("entity")] position = Vector2(0, -150) diff --git a/scripts/Contents/Characters/Chick.gd b/scripts/Contents/Characters/Chick.gd index 5ad76a6..83b0fa4 100644 --- a/scripts/Contents/Characters/Chick.gd +++ b/scripts/Contents/Characters/Chick.gd @@ -7,10 +7,10 @@ func register(): fields[FieldStore.Entity.MAX_HEALTH] = 2500 fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.4 attackCooldownMap[0] = 400 - attackCooldownMap[1] = 12000 - attackCooldownMap[2] = 2000 - attackCooldownMap[3] = 3000 - attackCooldownMap[4] = 4000 + attackCooldownMap[1] = 10000 + attackCooldownMap[2] = 3000 + attackCooldownMap[3] = 2000 + attackCooldownMap[4] = 2500 sprintMultiplier = 50 healthChanged.connect( func(h): @@ -36,7 +36,7 @@ func attack(type): for i in randi_range(7, 16): BulletBase.generate(ComponentManager.getBullet("Diamond"), self, weaponPos + MathTool.sampleInCircle(20), rotation + deg_to_rad(randf_range(-90, 90))) elif type == 1: - var laserCount = randi_range(2, 4) + var laserCount = randi_range(3, 4) for i in laserCount: BulletBase.generate(ComponentManager.getBullet("ChickLaser"), self, texture.global_position, deg_to_rad(360.0 / laserCount * i)) elif type == 2: diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 75265b9..1fb1740 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -22,7 +22,7 @@ func duplicate() -> Wave: wave.per = per return wave -static var current: int = startWith(1) if WorldManager.isRelease() else startWith(1) +static var current: int = startWith(1) if WorldManager.isRelease() else startWith(10) static var WAVE_NORMAL = [ Wave.create("Hen", 1, 3, false, 0, INF, 1), Wave.create("Cat", 1, 5, false, 0, INF, 1),