aego/timemodule
Deltafunction
func Delta() float
Delta returns the seconds since the previous frame. Inside FixedUpdate it is the fixed step.
Example
x += Speed * time.Delta()
Elapsedfunction
func Elapsed() float
Elapsed returns the seconds since Play started.
Example
y := math.Sin(time.Elapsed() * 3)
Fixedfunction
func Fixed() float
Fixed returns the fixed step length in seconds, 1/60 by default.
Example
steps := int(1 / time.Fixed())
Framefunction
func Frame() int
Frame returns the number of frames since Play started.
Example
if time.Frame() % 60 == 0 {
log.Info("tick")
}