1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 16:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Diamond.gd
T
fallingshrimp 187100f500 refactor(子弹系统): 将子弹前进逻辑提取到PresetsAI类中
将多个子弹类型的forward调用统一到PresetsAI类中,提高代码复用性
删除LockLauncher.gd文件及部分场景文件中冗余的fields配置
2025-08-29 10:56:33 +08:00

12 lines
339 B
GDScript

extends BulletBase
class_name Diamond
const traceTime = 2000
func register():
damage = 2
func ai():
rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.1 * clamp((traceTime - timeLived()) / traceTime, 0, INF))
canDamageSelf = !(timeLived() >= traceTime)
PresetsAI.forward(self, rotation)