1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00

fix(Characters/Chick): 修正激光子弹发射角度计算错误

将固定角度90度改为根据激光数量动态计算角度,使子弹均匀分布
This commit is contained in:
2025-09-20 07:32:39 +08:00
parent adf8b7d3f3
commit e6fda173d4
+1 -1
View File
@@ -30,7 +30,7 @@ func attack(type):
elif type == 1:
var laserCount = randi_range(2, 4)
for i in laserCount:
BulletBase.generate(preload("res://components/Bullets/ChickLaser.tscn"), self, texture.global_position, deg_to_rad(90 * i))
BulletBase.generate(preload("res://components/Bullets/ChickLaser.tscn"), self, texture.global_position, deg_to_rad(360.0 / laserCount * i))
elif type == 2:
var weaponPos = findWeaponAnchor("normal")
var target = weaponPos.angle_to_point(currentFocusedBoss.position)