1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 23:11:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/SevenSoul.gd
T
fallingshrimp 15a9e087aa fix(Characters): 修复治疗逻辑并优化七魂武器计时
重构Rooster.gd中的治疗逻辑,现在会检查生命值和物品数量
调整SevenSoul武器的生成间隔从20000ms减少到19500ms
为SevenSoul子弹添加generationDuration变量统一计时逻辑
在子弹生成时添加治疗效果
2025-09-26 22:22:49 +08:00

31 lines
849 B
GDScript

extends BulletBase
var colors = [
"#2BEAFF",
"#FCA500",
"#0042FF",
"#D346D0",
"#0C9B0B",
"#FDEB0F"
]
var index = 0
var generationDuration: float = 19500
@onready var heart = $"%heart"
@onready var effect: GPUParticles2D = $"%effect"
func spawn():
modulate = Color(colors[index % colors.size()])
effect.emitting = true
launcher.tryHeal(5)
func ai():
rotation_degrees = 360.0 / colors.size() * index + timeLived() / generationDuration * 360 - index / 6.0 * 360.0
heart.global_rotation_degrees = 0
PresetBulletAI.lockLauncher(self, launcher, true)
func applyDot():
if timeLived() > generationDuration * ((6.0 - index) / 6.0):
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