DoopelPonger
|
Listens for the ChangeTime event to change the timescale. More...
Public Member Functions | |
void | Awake () |
Register event listeners to trigger timescale changes. More... | |
void | FixedUpdate () |
Public Attributes | |
float | fastChangeRate |
float | slowChangeRate |
Listens for the ChangeTime event to change the timescale.
Changing the time scale is done linearly instead of instantly. It can change at two speeds, fast and slow. If specific events like the game restarting or going back to the main menu happen, the timescale will instantly go back to 1.
void TimeChangeListener.Awake | ( | ) |
Register event listeners to trigger timescale changes.
void TimeChangeListener.FixedUpdate | ( | ) |
Increase or decrease the timescale as needed.
float TimeChangeListener.fastChangeRate |
The rate the timescale should change when it needs to change quickly.
float TimeChangeListener.slowChangeRate |
The rate the timescale should change when it needs to change slowly.