From e77a5806d004c409e552edf8ea6c45c98d6f0628 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: Sun, 14 Sep 2025 14:10:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=92=E8=89=B2):=20=E5=A2=9E=E5=BC=BAK?= =?UTF-8?q?ukeMC=E8=A7=92=E8=89=B2=E5=B1=9E=E6=80=A7=E5=92=8C=E6=94=BB?= =?UTF-8?q?=E5=87=BB=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 增加KukeMC的最大生命值和移动速度 - 调整攻击冷却时间和射击偏移量 - 实现跟随BOSS的AI行为 - 修改紫水晶子弹的生成数量和位置 - 为武器节点添加normal锚点 --- components/Bullets/PurpleCrystal.tscn | 4 ++-- components/Characters/KukeMC.tscn | 2 ++ scripts/Contents/Characters/KukeMC.gd | 11 +++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/components/Bullets/PurpleCrystal.tscn b/components/Bullets/PurpleCrystal.tscn index 5ef4f6c..bc1991c 100644 --- a/components/Bullets/PurpleCrystal.tscn +++ b/components/Bullets/PurpleCrystal.tscn @@ -19,12 +19,12 @@ animations = [{ [node name="PurpleCrystal" instance=ExtResource("1_45mh7")] script = ExtResource("2_4lnlm") +displayName = "紫水晶" lifeDistance = 700.0 [node name="texture" parent="." index="0"] -position = Vector2(22, 0) sprite_frames = SubResource("SpriteFrames_r86b3") [node name="hitbox" parent="." index="1"] -position = Vector2(36, 0) +position = Vector2(-33, 0) shape = SubResource("CircleShape2D_ty1as") diff --git a/components/Characters/KukeMC.tscn b/components/Characters/KukeMC.tscn index 324a250..15484c5 100644 --- a/components/Characters/KukeMC.tscn +++ b/components/Characters/KukeMC.tscn @@ -37,5 +37,7 @@ animation = &"walk" [node name="hitbox" parent="texture/hurtbox" index="0"] shape = SubResource("RectangleShape2D_farlp") +[node name="normal" type="Node2D" parent="texture/weapons" index="0"] + [node name="statebar" parent="." index="3"] position = Vector2(0, -140) diff --git a/scripts/Contents/Characters/KukeMC.gd b/scripts/Contents/Characters/KukeMC.gd index 901848e..aa1c51f 100644 --- a/scripts/Contents/Characters/KukeMC.gd +++ b/scripts/Contents/Characters/KukeMC.gd @@ -1,10 +1,12 @@ extends EntityBase class_name KukeMC func register(): - fields[FieldStore.Entity.MAX_HEALTH] = 1000 - fields[FieldStore.Entity.OFFSET_SHOOT] = 45 - attackCooldownMap[0] = 500 + fields[FieldStore.Entity.MAX_HEALTH] = 2500 + fields[FieldStore.Entity.OFFSET_SHOOT] = 15 + fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.5 + attackCooldownMap[0] = 2000 func ai(): + PresetEntityAI.follow(self, currentFocusedBoss, 500) for bullet in get_tree().get_nodes_in_group("bullets"): if ( bullet is LGBTBullet and @@ -14,5 +16,6 @@ func ai(): tryAttack(0) func attack(type): if type == 0: - for i in randi_range(3, 8): + for i in randi_range(8, 16): BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position)) + await TickTool.millseconds(randi_range(10, 50))