2026-04-02 22:39:29 +08:00
|
|
|
extends BulletBase
|
|
|
|
|
class_name WuweiBullet
|
2026-04-02 22:49:34 +08:00
|
|
|
|
2026-04-03 18:29:14 +08:00
|
|
|
@export var canMove: bool = true
|
|
|
|
|
|
|
|
|
|
func ai():
|
|
|
|
|
if canMove:
|
|
|
|
|
PresetBulletAI.lockLauncher(self , launcher, true)
|
2026-04-03 19:24:27 +08:00
|
|
|
PresetBulletAI.trace(self , get_global_mouse_position(), 0.1)
|
2026-04-03 18:29:14 +08:00
|
|
|
|
2026-04-02 22:49:34 +08:00
|
|
|
func shoot():
|
2026-04-03 18:29:14 +08:00
|
|
|
for bullet in BulletBase.generate(
|
|
|
|
|
ComponentManager.getBullet("InfinitySword"),
|
|
|
|
|
launcher,
|
|
|
|
|
position + Vector2.from_angle(rotation) * 400,
|
|
|
|
|
rotation
|
|
|
|
|
):
|
|
|
|
|
if bullet is InfinitySwordBullet:
|
|
|
|
|
bullet.baseDamage = baseDamage
|
|
|
|
|
func beReady():
|
|
|
|
|
canMove = false
|
|
|
|
|
EffectController.create(ComponentManager.getEffect("Danger"), findAnchor("Spawn")).shot()
|