mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
ae77d624b1
修改BigLaser和Diamond子弹的旋转逻辑,使用lerp_angle实现平滑过渡 调整Diamond子弹的追踪速度系数从0.1提高到0.2
10 lines
314 B
GDScript
10 lines
314 B
GDScript
extends BulletBase
|
|
class_name Diamond
|
|
|
|
const traceTime = 2000
|
|
|
|
func ai():
|
|
rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.2 * clamp((traceTime - timeLived()) / traceTime, 0, INF))
|
|
canDamageSelf = !(timeLived() >= traceTime)
|
|
forward(Vector2.from_angle(rotation))
|