1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 00:11:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/SevenSoul.gd
T
fallingshrimp 49d3a31367 feat(武器): 更新七魂武器效果并添加音效
- 添加攻击音效文件
- 修改七魂子弹生成逻辑,从7个改为6个并添加延迟
- 调整子弹生命周期和旋转动画
- 更新武器描述和属性
- 添加新的测试BOSS波浪数据
2025-09-25 22:41:04 +08:00

26 lines
697 B
GDScript

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