Last updated: Sep 11, 2022

Introduction

The Time Handler component helps us change the game’s time scale. This is something quite important for us as it helps with demonstrating all of the animations.

You can find the Time Handler at this path: Assets\Infima Games\Low Poly Animated - Modern Guns\Demo\Code\Miscellaneous\TimeHandler.cs

Fields Serialized

Increment. Value the time scale gets updated every time.

Fields

Paused. Determines if the time is stopped.

Current. Current Time Scale.

Methods

Scale. Updates the game’s TimeScale value to match what we want to set it to.

Change. Changes the Current value to match a new one.

Increase. Increments the Current value by a certain amount.

Pause. Pauses the game’s TimeScale.

Toggle. Toggles the game paused/unpaused.

Unpause. Unpauses the game’s TimeScale.