Clock
Classes
Construct for keeping track of time
Functions
Clock
Construct for keeping track of time
Kind: global class
- Clock
- .elapsedTime :
number - .timeAtDelta :
number - .speed :
Stat - .multiplier
- .multiplier ⇒
number - .getDelta() ⇒
number - .updateElapsedTime() ⇒
number - .getElapsedTime() ⇒
number
- .elapsedTime :
clock.elapsedTime : number
In seconds
Kind: instance property of Clock
clock.timeAtDelta : number
Timestamp when getDelta was last called In seconds
Kind: instance property of Clock
clock.speed : Stat
how fast clock ticks in relation to real time Allows us to slow down or speed up flow of time via modifiers, see Stat for details Default speed is x1, i.e. - unmodified
Kind: instance property of Clock
Read only: true
clock.multiplier
Kind: instance property of Clock
| Param | Type |
|---|---|
| v | number |
clock.multiplier ⇒ number
Kind: instance property of Clock
clock.getDelta() ⇒ number
Elapsed time since last getDelta call
Kind: instance method of Clock
clock.updateElapsedTime() ⇒ number
Kind: instance method of Clock
clock.getElapsedTime() ⇒ number
Time elapsed so far, since the clock was started Only counts time while running
Kind: instance method of Clock
updateElapsedTime(clock)
Kind: global function
| Param | Type |
|---|---|
| clock | Clock |