DoopelPonger
Public Member Functions | Public Attributes | List of all members
TimeChangeListener Class Reference

Listens for the ChangeTime event to change the timescale. More...

Inheritance diagram for TimeChangeListener:
Inheritance graph
[legend]
Collaboration diagram for TimeChangeListener:
Collaboration graph
[legend]

Public Member Functions

void Awake ()
 Register event listeners to trigger timescale changes. More...
 
void FixedUpdate ()
 

Public Attributes

float fastChangeRate
 
float slowChangeRate
 

Detailed Description

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.

Member Function Documentation

◆ Awake()

void TimeChangeListener.Awake ( )

Register event listeners to trigger timescale changes.

◆ FixedUpdate()

void TimeChangeListener.FixedUpdate ( )

Increase or decrease the timescale as needed.

Member Data Documentation

◆ fastChangeRate

float TimeChangeListener.fastChangeRate

The rate the timescale should change when it needs to change quickly.

◆ slowChangeRate

float TimeChangeListener.slowChangeRate

The rate the timescale should change when it needs to change slowly.


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