A class in Root.Township, the global namespace.
Saves and loads the world's time of day and applies the server's time speed setting to Timeline. One per scene, reached through the static instance.
Constructors
| Member | What it is |
|---|
TimeManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
static TimeManager instance | The active time manager. |
Methods
| Member | What it is |
|---|
override void Initialize() | Server: applies the time speed setting now and whenever the server config changes (skipped for entity identifier 1 or lower). |
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Sets instance, or destroys itself if another exists. |
private void OnDestroy() | Server: stops listening to server config changes. |
private void UpdateSettings(Settings settings) | Server: sets Timeline.Instance.TimeSpeed from the server's TimeSpeedMultiplier. |