mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 11:47:13 +08:00
feat(Statemachine): 添加获取周期计时器方法并增强子弹过滤逻辑
为EntityBase添加getCycleTimer方法以直接获取计时器 修改CycleTimer的forceFilter方法以检查子弹是否正在销毁 更新InfinitySword的hitBullet逻辑以处理内部伤害子弹
This commit is contained in:
@@ -227,6 +227,8 @@ func getOrCreateCycleTimer(timerName: String, period: float = 1000, distance: fl
|
||||
if start: newTimer.start()
|
||||
cycleTimers[timerName] = newTimer
|
||||
return cycleTimers[timerName]
|
||||
func getCycleTimer(timerName: String):
|
||||
return cycleTimers.get(timerName)
|
||||
func initHealth(maxHealth: float):
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = maxHealth
|
||||
health = maxHealth
|
||||
|
||||
Reference in New Issue
Block a user