1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/PurpleCrystal.gd
T
fallingshrimp 4c5842fb9e refactor(资源加载): 将preload替换为load以优化内存使用
统一使用load方法动态加载资源,减少启动时的内存占用
移动Manager类到Tools/Managers目录下
修复DirTool处理remap文件的问题
2025-09-21 12:53:15 +08:00

27 lines
745 B
GDScript

extends BulletBase
func ai():
PresetBulletAI.forward(self, rotation)
func destroy(_beacuseMap: bool):
var eff = EffectController.create(load("res://components/Effects/PurpleCrystalExplosion.tscn"), global_position)
eff.rotation = rotation
eff.shot()
func split(index, total, _last):
BulletBase.generate(
load("res://components/Bullets/PurpleCrystal.tscn"),
launcher,
position,
rotation + deg_to_rad(360 / total * index),
true,
isChildRefract
)
func refract(entity, _index, _total, _last):
BulletBase.generate(
load("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
)