-
Notifications
You must be signed in to change notification settings - Fork 1
Time Manager
Luke Mirman edited this page Sep 5, 2022
·
2 revisions
The TimeManager class gives functionality for modifying the Time.timeScale and support for Pausing/Unpausing it. By utilizing this class pausing will not lose the previous value of timeScale when resuming the game.
| Method | Description |
|---|---|
Pause() |
Freeze the game simulation, setting time scale to 0. |
Unpause() |
Resume the game simulation, setting time scale to the TimeScalar
|
SetScalar(float) |
Set the time scale for when the game is unpaused. |
ClearScalar() |
Shorthand for SetScalar(1)
|
| Property | Description |
|---|---|
IsPaused |
If the game simulation is currently paused. |
TimeScale |
The current actual time scale that the TimeManager has set. |
TimeScalar |
The desired timeScale while unpaused. |