new Clock()
Clock is used to keep count of the time elapse between
game frames.
- Source:
Methods
-
getFps() → {number}
-
Gets the current fps count.
- Source:
Returns:
Fps count.- Type
- number
-
getTime() → {number}
-
Gets the current time in miliseconds.
- Source:
Returns:
Current time.- Type
- number
-
<private> reset(time)
-
Resets all properties, at least at each second passed.
Parameters:
Name Type Description time
number Current time. - Source:
-
update() → {number}
-
Updates the game. Should be at the beggining of the frame.
- Source:
Returns:
Time, in miliseconds, elapsed since the last update.- Type
- number