|
Nebula
|
The mirror of the engine's time sources.
The engine has authority over the time, and this holds what the last sync saw, so a read is a field read rather than a call through the api.
Public Member Functions | |
| TimeSource | Get (uint hash) |
| The mirror for a time source, or null when the runtime has not seen one with this hash. | |
| TimeSource | Create (uint hash, double fixedFrameTime, int maxStepsPerFrame=5) |
| Create a time source in the engine and mirror it here. | |
| void | Sync () |
| Refresh the mirror from the engine. | |
Properties | |
| static TimeManager | Instance [get] |
| Returns the time manager singleton instance. | |
| float | GlobalTimeFactor [get, set] |
| The global time scale. | |
| TimeSource | System [get] |
| TimeSource | Gameplay [get] |
| TimeSource | Input [get] |
Private Member Functions | |
| TimeManager () | |
Static Private Member Functions | |
| static | TimeManager () |
Private Attributes | |
| readonly TimeSourceSnapshot[] | buffer |
| readonly GCHandle | handle |
| readonly Dictionary< uint, TimeSource > | sources |
| float | globalTimeFactor |
Static Private Attributes | |
| const int | MaxSources = 32 |
| static readonly TimeManager | instance = new TimeManager() |
|
inlinestaticprivate |
|
inlineprivate |
|
inline |
Create a time source in the engine and mirror it here.
Asking for one that already exists gives the mirror for it.
|
inline |
The mirror for a time source, or null when the runtime has not seen one with this hash.
|
inline |
Refresh the mirror from the engine.
Called once per frame at the beginning of the frame, after the engine has advanced the sources, so the values are this frame's and the fixed steps have not been consumed yet.
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
private |
|
get |
|
getset |
The global time scale.
This should be used sparingly; a source's own factor is usually what you want.
|
get |
|
staticget |
Returns the time manager singleton instance.
|
get |