mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
40732f2daf
修改紫色水晶爆炸效果的方向、扩散角度和初始速度,使其更符合预期效果。同时增加粒子数量,提升视觉效果。
28 lines
774 B
GDScript
28 lines
774 B
GDScript
extends BulletBase
|
|
class_name PurpleCrystal
|
|
|
|
func ai():
|
|
PresetAIs.forward(self, rotation)
|
|
func destroy(_beacuseMap: bool):
|
|
var eff = EffectController.create(preload("res://components/Effects/PurpleCrystalExplosion.tscn"), global_position)
|
|
eff.rotation = rotation
|
|
eff.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
|
|
)
|