1
0
Fork 0
This commit is contained in:
Arthur K. 2026-05-14 20:19:22 +03:00
commit 7cc71fb719
Signed by: wzray
GPG key ID: B97F30FDC4636357
13 changed files with 840 additions and 0 deletions

View file

@ -0,0 +1,21 @@
package challenge
import "time"
func (e *Engine) startFloorTimer(p *Player, at time.Duration) {
if p.Floor >= 1 && p.Floor <= e.regularFloors && !e.floorCleared(p, p.Floor) {
p.floorTimerOn = true
p.floorTimerAt = at
}
}
func (e *Engine) pauseFloorTimer(p *Player, at time.Duration) {
if p.floorTimerOn {
p.FloorDurations[p.Floor] += at - p.floorTimerAt
p.floorTimerOn = false
}
}
func (e *Engine) finishFloorTimer(p *Player, at time.Duration) {
e.pauseFloorTimer(p, at)
}