1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/VectorStar.gd
T
fallingshrimp 95db9deb3c feat: 添加矢量星武器和子弹功能
实现新的矢量星武器系统,包括武器卡片、子弹行为和粒子效果。主要功能包括:
- 添加VectorStarWeapon.gd武器脚本,支持多子弹发射和追踪目标
- 实现VectorStar.gd子弹脚本,包含初始冲刺和后续追踪逻辑
- 添加相关场景资源和配置
- 将新武器添加到公鸡角色的武器库中
2025-09-06 13:27:00 +08:00

19 lines
474 B
GDScript

extends BulletBase
class_name VectorStar
var tracer: EntityBase = null
var forwardTime: float = 1000
var forwarded: bool = false
func ai():
texture.rotation_degrees *= 1.1
PresetAIs.forward(self, rotation)
if timeLived() <= forwardTime:
speed = 10 * ((forwardTime - timeLived()) / forwardTime)
elif forwarded:
speed = (timeLived() - forwardTime) / 20
else:
forwarded = true
if is_instance_valid(tracer):
rotation = position.angle_to_point(tracer.position)