mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 07:21:54 +08:00
2a55e394cd
为InfinitySword子弹添加射击音效资源fireshot.mp3 在spawn方法中实现屏幕震动效果 调整动画时间点和添加音频轨道
18 lines
487 B
GDScript
18 lines
487 B
GDScript
extends BulletBase
|
|
class_name InfinitySwordBullet
|
|
|
|
var implused: Array[EntityBase] = []
|
|
|
|
func spawn():
|
|
CameraManager.shake(2000, 100)
|
|
func ai():
|
|
PresetBulletAI.forward(self , rotation)
|
|
func succeedToHit(_dmg: float, entity: EntityBase):
|
|
if implused.has(entity): return
|
|
else:
|
|
implused.append(entity)
|
|
entity.impluse(Vector2.from_angle(rotation) * 1500)
|
|
var eff = EffectController.create(ComponentManager.getEffect("ShootBlood"), entity.position)
|
|
eff.particles.hide()
|
|
eff.shot()
|