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

19 lines
510 B
GDScript
Raw Normal View History

2025-09-06 13:27:00 +08:00
extends BulletBase
class_name VectorStar
var tracer: EntityBase = null
var forwardTime: float = 1000
var forwarded: bool = false
2025-09-06 17:08:17 +08:00
var rotateSpeed: float = 1
2025-09-06 13:27:00 +08:00
func ai():
2025-09-06 17:08:17 +08:00
texture.rotation_degrees += rotateSpeed
rotateSpeed += 0.25
PresetBulletAI.forward(self, rotation)
2025-09-06 13:27:00 +08:00
if timeLived() <= forwardTime:
speed = 10 * ((forwardTime - timeLived()) / forwardTime)
else:
speed = (timeLived() - forwardTime) / 30
2025-09-06 13:27:00 +08:00
if is_instance_valid(tracer):
rotation = position.angle_to_point(tracer.getTrackingAnchor())