1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/PurpleCrystal.gd
T
fallingshrimp c2d5f6565c fix(Bullets): 修正紫色水晶子弹分裂时的旋转角度计算
refactor(Wave): 移除重复的Chick boss生成配置
2025-09-06 09:34:10 +08:00

26 lines
734 B
GDScript

extends BulletBase
class_name PurpleCrystal
func ai():
PresetAIs.forward(self, rotation)
func destroy(_beacuseMap: bool):
EffectController.create(preload("res://components/Effects/PurpleCrystalExplosion.tscn"), global_position).shot()
func split(index, total, _last):
BulletBase.generate(
preload("res://components/Bullets/PurpleCrystal.tscn"),
launcher,
position,
rotation + deg_to_rad(360 / total * index),
true,
isChildRefract
)
func refract(entity, _index, _total, _last):
BulletBase.generate(
preload("res://components/Bullets/PurpleCrystal.tscn"),
launcher,
position,
position.angle_to_point(entity.position) if is_instance_valid(entity) else randf_range(0, deg_to_rad(360)),
isChildSplit,
true
)