mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(特效): 添加FooExplosion爆炸效果的多变体资源
新增三种不同变体的爆炸效果资源,包括图片和动画配置 重构爆炸效果实现以支持随机选择不同变体 移除旧的单一爆炸效果资源
This commit is contained in:
@@ -19,7 +19,10 @@ func ai():
|
||||
func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
if entity == tracer:
|
||||
tryDestroy() # 只需要命中一次目标就不需要继续前进了
|
||||
EffectController.create(
|
||||
var eff = EffectController.create(
|
||||
ComponentManager.getEffect("FooExplosion"),
|
||||
entity.texture.global_position
|
||||
).shot()
|
||||
)
|
||||
var varians = randi_range(0, 2)
|
||||
eff.texture.sprite_frames = load("res://resources/effects/FooExplosion/%d/%d.tres" % [varians, varians])
|
||||
eff.shot()
|
||||
|
||||
Reference in New Issue
Block a user