![]() |
Infohazard.Core 1.4.1
Infohazard Core Utility Library
|
Manages pausing and unpausing of the game. More...
Properties | |
static float | TimeScale [get, set] |
Get or set the non-paused timescale. Only affects current Time.timeScale if not paused. More... | |
static bool | Paused [get, set] |
Controls paused state of the game. More... | |
Events | |
static Action | GamePaused |
Invoked when the game pauses. More... | |
static Action | GameResumed |
Invoked when the game un-pauses. More... | |
Manages pausing and unpausing of the game.
Any actions that should only happen when the game is not paused should check Pause.paused. Can be used statically if pause is controlled elsewhere, or placed as a component to pause the game from a UnityEvent. The game will automatically unpause when a new scene is loaded.
|
staticgetset |
Controls paused state of the game.
This cannot completely prevent game actions from happening, but it does sets Time.timeScale to 0 so that Physics and animation will stop.
|
staticgetset |
Get or set the non-paused timescale. Only affects current Time.timeScale if not paused.
|
static |
Invoked when the game pauses.
|
static |
Invoked when the game un-pauses.