Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.Pause Class Reference

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...
 

Detailed Description

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.

Property Documentation

◆ Paused

bool Infohazard.Core.Pause.Paused
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.

◆ TimeScale

float Infohazard.Core.Pause.TimeScale
staticgetset

Get or set the non-paused timescale. Only affects current Time.timeScale if not paused.

Event Documentation

◆ GamePaused

Action Infohazard.Core.Pause.GamePaused
static

Invoked when the game pauses.

◆ GameResumed

Action Infohazard.Core.Pause.GameResumed
static

Invoked when the game un-pauses.


The documentation for this class was generated from the following file: