1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-06 03:37:13 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Wood.gd
T

14 lines
394 B
GDScript
Raw Normal View History

extends BulletBase
class_name WoodBullet
var speedV2: Vector2 = Vector2.ZERO
func spawn():
speedV2 = Vector2.from_angle(rotation) * 10
func ai():
if is_instance_valid(launcher.currentFocusedBoss):
speedV2 += (launcher.currentFocusedBoss.position - launcher.position).normalized() * 1
speed = speedV2.length() / 2.0
rotation = speedV2.angle()
PresetBulletAI.forward(self , rotation)