From df1f8371958cbe7936a46309345f3e04da96634e 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: Mon, 16 Feb 2026 17:57:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=AD=90=E5=BC=B9?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E5=80=BC=E5=B9=B6=E4=BC=98=E5=8C=96=E9=BD=BF?= =?UTF-8?q?=E8=BD=AE=E5=AD=90=E5=BC=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整EntityBase中子弹偏移值从3改为5 在Cogwheel.gd中添加spawn函数并优化减速逻辑 在Rooster.gd中修复chargeStartTime变量位置并添加测试用额外子弹数 --- scripts/Contents/Bullets/Cogwheel.gd | 4 ++++ scripts/Contents/Characters/Rooster.gd | 4 +++- scripts/Statemachine/EntityBase.gd | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/Contents/Bullets/Cogwheel.gd b/scripts/Contents/Bullets/Cogwheel.gd index 8a1b86a..f028a66 100644 --- a/scripts/Contents/Bullets/Cogwheel.gd +++ b/scripts/Contents/Bullets/Cogwheel.gd @@ -6,6 +6,8 @@ var rotateSpeed: float = 0 var dotTime: float = 0 var slow: float = 0.2 +func spawn(): + slow *= initialRotate / 15.0 func ai(): PresetBulletAI.forward(self, rotation) texture.rotation_degrees += rotateSpeed @@ -16,6 +18,8 @@ func ai(): tryDestroy() else: speed = initialSpeed * (rotateSpeed / initialRotate) + if rotateSpeed >= 0 and rotateSpeed / slow <= 0: + slow *= 2 dotTime = 1000 / (rotateSpeed) rotateSpeed -= slow func applyDot(): diff --git a/scripts/Contents/Characters/Rooster.gd b/scripts/Contents/Characters/Rooster.gd index 068a86b..39b8c87 100644 --- a/scripts/Contents/Characters/Rooster.gd +++ b/scripts/Contents/Characters/Rooster.gd @@ -1,6 +1,7 @@ extends EntityBase class_name Rooster +var chargeStartTime = {} @onready var chargeParticle: GPUParticles2D = $%chargeParticle func register(): @@ -14,7 +15,8 @@ func register(): EffectController.create(ComponentManager.getEffect("BloodFall"), texture.global_position).shot() ) chargeParticle.emitting = false -var chargeStartTime = {} + if !WorldManager.isRelease(): + fields[FieldStore.Entity.EXTRA_BULLET_COUNT] = 3 func ai(): texture.play("walk") diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 18891a9..22347cd 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -29,7 +29,7 @@ var fields = { FieldStore.Entity.ENERGY_REGENERATION: 1, FieldStore.Entity.PERFECT_MISS_WINDOW: 0.05, "子弹": TITLE_FLAG, - FieldStore.Entity.OFFSET_SHOOT: 3, + FieldStore.Entity.OFFSET_SHOOT: 5, FieldStore.Entity.PENERATE: 0, FieldStore.Entity.EXTRA_BULLET_COUNT: 0, FieldStore.Entity.BULLET_SPLIT: 0,