1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00

refactor(Bullets): 移除SevenSoul子弹的spawnedChild变量及相关逻辑

简化子弹生成逻辑,移除不再需要的状态变量和循环生成子子弹的代码
This commit is contained in:
2025-09-26 22:19:16 +08:00
parent 949b957696
commit 061f3022b3
-7
View File
@@ -9,7 +9,6 @@ var colors = [
"#FDEB0F"
]
var index = 0
var spawnedChild = false
@onready var heart = $"%heart"
@onready var effect: GPUParticles2D = $"%effect"
@@ -24,12 +23,6 @@ func ai():
PresetBulletAI.lockLauncher(self, launcher, true)
func applyDot():
if timeLived() > 20000 * ((6.0 - index) / 6.0):
if !spawnedChild:
spawnedChild = true
var count = 7
for i in count:
BulletBase.generate(ComponentManager.getBullet("WhiteSoul"), launcher, heart.global_position, rotation + deg_to_rad(360.0 / count * i))
await TickTool.millseconds(50)
BulletBase.generate(ComponentManager.getBullet("SoulBall"), launcher, heart.global_position, heart.global_position.angle_to_point(get_global_mouse_position()))
await TickTool.millseconds(100)
return true