2025-08-26 12:21:09 +08:00
|
|
|
extends BulletBase
|
|
|
|
|
|
|
|
|
|
func ai():
|
2025-09-06 18:33:11 +08:00
|
|
|
PresetBulletAI.forward(self, rotation)
|
2025-08-29 18:34:58 +08:00
|
|
|
func destroy(_beacuseMap: bool):
|
2025-09-21 13:11:31 +08:00
|
|
|
var eff = EffectController.create(ComponentManager.getEffect("PurpleCrystalExplosion"), global_position)
|
2025-09-06 16:55:09 +08:00
|
|
|
eff.rotation = rotation
|
|
|
|
|
eff.shot()
|
2025-09-05 22:23:41 +08:00
|
|
|
func split(index, total, _last):
|
|
|
|
|
BulletBase.generate(
|
2025-09-21 13:11:31 +08:00
|
|
|
ComponentManager.getBullet("PurpleCrystal"),
|
2025-09-05 22:23:41 +08:00
|
|
|
launcher,
|
|
|
|
|
position,
|
2025-09-06 09:34:10 +08:00
|
|
|
rotation + deg_to_rad(360 / total * index),
|
2025-09-06 08:50:37 +08:00
|
|
|
true,
|
|
|
|
|
isChildRefract
|
2025-09-05 22:23:41 +08:00
|
|
|
)
|
|
|
|
|
func refract(entity, _index, _total, _last):
|
|
|
|
|
BulletBase.generate(
|
2025-09-21 13:11:31 +08:00
|
|
|
ComponentManager.getBullet("PurpleCrystal"),
|
2025-09-05 22:23:41 +08:00
|
|
|
launcher,
|
|
|
|
|
position,
|
|
|
|
|
position.angle_to_point(entity.position) if is_instance_valid(entity) else randf_range(0, deg_to_rad(360)),
|
2025-09-06 08:50:37 +08:00
|
|
|
isChildSplit,
|
2025-09-05 22:23:41 +08:00
|
|
|
true
|
|
|
|
|
)
|