Skip to content

time_system::time_scale

Paweł Waligóra edited this page May 4, 2024 · 4 revisions

Variable that defines how fast is the time passing;

If time_system::time_scale == 1.0f, then game is running real time.

If 0.0f < time_system::time_scale < 1.0f, then game is running in slow motion

If time_system::time_scale > 1.0f, then game is sped up.

If time_system::time_scale == 0.0f, then game is paused.

If time_system::time_scale < 0.0f then undefined behaviour.

value effect
>1.0f sped up
1.0f normal speed
(0.0f ; 1.0f) slow motion
0.0f paused
<0.0f undefined behaviour

Usage

Just write to time_system::time_scale any value greater or equal to 0.0f at any point in application.

Home

Git Workflow

Issues

Coding Rules

Skrypty-Tutorial

Useful resources

Game Structure

Code Structure

Clone this wiki locally