mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(战斗系统): 添加招架球子弹和循环计时器功能
实现新的招架球子弹类型(ParryBallBullet)及其相关行为 新增CycleTimer类用于管理子弹的周期性运动 在EntityBase中添加计时器管理功能,支持创建和应用周期计时器 添加招架球子弹的资源文件和相关配置
This commit is contained in:
@@ -10,3 +10,13 @@ func hitBullet(bullet: BulletBase):
|
||||
eff.modulate = bullet.modulate.blend(bullet.texture.modulate)
|
||||
eff.shot()
|
||||
bullet.tryDestroy()
|
||||
var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100)
|
||||
if len(cycler.bullets) < 5:
|
||||
for b in BulletBase.generate(
|
||||
ComponentManager.getBullet("ParryBall"),
|
||||
launcher,
|
||||
position,
|
||||
0
|
||||
):
|
||||
if b is ParryBallBullet:
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
extends BulletBase
|
||||
class_name ParryBallBullet
|
||||
|
||||
var cycler: CycleTimer
|
||||
|
||||
func spawn():
|
||||
cycler = launcher.getOrCreateCycleTimer("parry")
|
||||
cycler.host(self )
|
||||
func ai():
|
||||
PresetBulletAI.selfRotate(self , 5)
|
||||
hitbox.disabled = !launcher.sprinting
|
||||
@@ -0,0 +1 @@
|
||||
uid://6to3ptrfe6dr
|
||||
Reference in New Issue
Block a user