1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Presets/Presets.gd
T
fallingshrimp 5c16dcc294 feat(子弹): 重构小鸡激光攻击并优化子弹行为
- 替换原有Laser为ChickLaser,实现更华丽的激光效果
- 调整FireScan子弹速度和伤害值
- 优化Diamond子弹追踪逻辑和持续时间
- 新增PresetsAI.lockLauncher方法用于固定子弹位置
- 调整Chick角色的攻击冷却时间和攻击距离判定
2025-08-29 11:17:02 +08:00

13 lines
480 B
GDScript

class_name PresetsAI
static func lockLauncher(bullet: BulletBase, launcher: EntityBase, onTexture: bool = false):
bullet.position = launcher.texture.global_position if onTexture else launcher.position
static func forward(bullet: BulletBase, rotation: float):
bullet.forward(Vector2.from_angle(rotation))
static func trace(bullet: BulletBase, target: Vector2, speed: float):
bullet.rotation = lerp_angle(
bullet.rotation,
bullet.position.angle_to_point(target),
speed
)