Timer
Implements:
- ImmutableTimer ,
- EventListenerObject ,
- Disposable
A timer.
Original implementation by Michael Herzog (Mugen87).
Constructor Summary
Public Constructor | ||
public |
Constructs a new timer. |
Member Summary
Public Members | ||
public get |
Enables or disables auto reset based on page visibility. |
|
public set |
|
|
public get |
delta: * |
|
public get |
elapsed: * |
|
public get |
fixedDelta: * |
|
public set |
|
|
public |
The timescale. |
|
public |
Determines whether this timer should use a fixed time step. |
Method Summary
Public Methods | ||
public |
dispose() |
|
public |
getDelta(): * |
|
public |
getElapsed(): * |
|
public |
handleEvent(e: *) |
|
public |
reset() Resets this timer. |
|
public |
Updates this timer. |
Public Constructors
Public Members
public get autoReset: Boolean source
Enables or disables auto reset based on page visibility.
If enabled, the timer will be reset when the page becomes visible. This effectively pauses the timer when the page is hidden. Has no effect if the API is not supported.