1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-07-03 16:52:13 +08:00

fix(BulletBase): 将碰撞检测从body_entered改为area_entered

修复子弹碰撞检测逻辑,使用area_entered代替body_entered以正确检测碰撞区域
同时调整Volcano子弹的切割速度为0.7以改善游戏体验
This commit is contained in:
2025-11-23 07:10:49 +08:00
parent 33e6758965
commit 3d6d1d24c9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ var dmg5: float = 0
var splitAngle: float = 10 var splitAngle: float = 10
func register(): func register():
setupCuttable(0.1) setupCuttable(0.7)
func ai(): func ai():
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED) * speedScale animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED) * speedScale
PresetBulletAI.lockLauncher(self, launcher, true) PresetBulletAI.lockLauncher(self, launcher, true)
+2 -2
View File
@@ -88,13 +88,13 @@ func _physics_process(_delta: float) -> void:
tryDestroy() tryDestroy()
func setupCuttable(cutSpeed: float): func setupCuttable(cutSpeed: float):
body_entered.connect( area_entered.connect(
func(body): func(body):
var entity = EntityTool.fromHurtbox(body) var entity = EntityTool.fromHurtbox(body)
if entity: if entity:
speedScale = cutSpeed speedScale = cutSpeed
) )
body_exited.connect( area_exited.connect(
func(body): func(body):
var entity = EntityTool.fromHurtbox(body) var entity = EntityTool.fromHurtbox(body)
if entity: if entity: