Functions to get information about timing. Mostly for internal use.
gamvas. | Functions to get information about timing. |
Functions | |
getSeconds | Get the seconds since gamvas was started. |
getMilliseconds | Get the milliseconds since gamvas was started. |
setGlobalTimeScale | Scale the global time. |
getGlobalTimeScale | Returns the global timescale |
setGlobalTimeScale: function( s )
Scale the global time. Use it to achieve slow motion or fast forward effects. Time scale must be >= 0
Does also ‘scale’ the frames per second value returned by gamvas.screen.getFPS. So if you set a global time scale of 0.5, gamvas.screen.getFPS will return 120 when actually running on 60 fps
s | time scale factor (1 = normal, < 1 = slower, > 1 = faster) |
Get the seconds since gamvas was started.
getSeconds: function()
Get the milliseconds since gamvas was started.
getMilliseconds: function()
Scale the global time.
setGlobalTimeScale: function( s )
Returns the global timescale
getGlobalTimeScale: function()
Returns the current frames per second.
getFPS: function()