![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Handles time related operations such as getting the current frame time. This implementation is a simple wrapper on delta time that limits the maximum time of a frame to a user defined maximum value. More...
Public Member Functions | |
virtual void | OnGamePaused () |
Raises the game paused event. More... | |
virtual void | OnGameUnPaused () |
Raises the game unpaused event. More... | |
void | TogglePause (bool setTimeScale) |
Pause the game. More... | |
void | Pause (bool setTimeScale, bool skipPauseMenu=false) |
Pause the game. More... | |
void | UnPause (bool setTimeScale) |
Unpause the game. More... | |
void | UnPause (float newTimeScale) |
Unpause the game. More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
Public Attributes | |
float | maximumFrameTime = DefaultMaximumFrameTime |
The maximum permissable frame time. More... | |
Static Public Attributes | |
const float | DefaultMaximumFrameTime = 0.033f |
The default maximum frame time. More... | |
Static Protected Member Functions | |
static void | CreateNewTimeManager () |
Creates a new time manager. More... | |
Protected Attributes | |
UIPauseMenu | pauseMenu |
The pause menu. More... | |
Static Protected Attributes | |
static bool | paused |
Are we paused? More... | |
static TimeManager | instance |
The time manager instance. More... | |
Properties | |
override string | Header [get] |
Gets the header string used to describe the component. More... | |
static float | FrameTime [get] |
Gets the frame time. More... | |
static float | MaxFrameTime [get] |
Gets the maximum possible frame time. More... | |
static TimeManager | Instance [get, protected set] |
Gets a static reference to the time manager if one exists. More... | |
static TimeManager | SafeInstance [get] |
Gets the instance only if it exists will not create a new one. Safe to call from OnDestroy while unregistering listeners. More... | |
bool | Paused [get] |
Are we paused? More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
Events | |
System.EventHandler< EmptyEventArgs > | GamePaused |
Event for pause. More... | |
System.EventHandler< System.EventArgs > | GameUnPaused |
Event for unpause. More... | |
Handles time related operations such as getting the current frame time. This implementation is a simple wrapper on delta time that limits the maximum time of a frame to a user defined maximum value.
|
staticprotected |
Creates a new time manager.
|
virtual |
Raises the game paused event.
|
virtual |
Raises the game unpaused event.
void PlatformerPro.TimeManager.Pause | ( | bool | setTimeScale, |
bool | skipPauseMenu = false |
||
) |
Pause the game.
setTimeScale | If set to true then Time.timeScale will also be set to 0. |
void PlatformerPro.TimeManager.TogglePause | ( | bool | setTimeScale | ) |
Pause the game.
setTimeScale | If set to true then Time.timeScale will also be set to 0. |
void PlatformerPro.TimeManager.UnPause | ( | bool | setTimeScale | ) |
Unpause the game.
setTimeScale | If set to true then Time.timeScale will also be set to 1. |
void PlatformerPro.TimeManager.UnPause | ( | float | newTimeScale | ) |
Unpause the game.
newTimeScale | Time.timeScale will be set to newTimeScale. |
|
static |
The default maximum frame time.
|
staticprotected |
The time manager instance.
float PlatformerPro.TimeManager.maximumFrameTime = DefaultMaximumFrameTime |
The maximum permissable frame time.
|
staticprotected |
Are we paused?
|
protected |
The pause menu.
|
staticget |
Gets the frame time.
|
get |
Gets the header string used to describe the component.
The header.
|
staticgetprotected set |
Gets a static reference to the time manager if one exists.
The instance.
|
staticget |
Gets the maximum possible frame time.
|
get |
Are we paused?
|
staticget |
Gets the instance only if it exists will not create a new one. Safe to call from OnDestroy while unregistering listeners.
System.EventHandler<EmptyEventArgs> PlatformerPro.TimeManager.GamePaused |
Event for pause.
System.EventHandler<System.EventArgs> PlatformerPro.TimeManager.GameUnPaused |
Event for unpause.