1
1
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:
2026-05-10 13:17:00 +08:00
parent 8f90bde510
commit 6e0d0ad89b
3 changed files with 15 additions and 2 deletions
+2
View File
@@ -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