Documentation ¶
Overview ¶
Package clock manages game timers.
Index ¶
Constants ¶
View Source
const ( DefaultTPS = 60 SyncWithFPS = -1 )
Variables ¶
This section is empty.
Functions ¶
func UpdateFrame ¶ added in v2.4.0
func UpdateFrame() int
UpdateFrame updates the inner clock state and returns an integer value indicating how many times the game should update based on the current tps.
If tps is SyncWithFPS, UpdateFrame always returns 1. If tps <= 0 and not SyncWithFPS, UpdateFrame always returns 0.
UpdateFrame is expected to be called once per frame.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.