remove demo game
This commit is contained in:
10
util.timer.go
Normal file
10
util.timer.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package pncdsl
|
||||
|
||||
// Timer accumulates seconds. Tick advances it; Reset zeroes it.
|
||||
type Timer struct {
|
||||
Elapsed float64
|
||||
}
|
||||
|
||||
func (t *Timer) Tick(dt float64) { t.Elapsed += dt }
|
||||
func (t *Timer) Reset() { t.Elapsed = 0 }
|
||||
func (t *Timer) Done(after float64) bool { return t.Elapsed >= after }
|
||||
Reference in New Issue
Block a user