C# Класс Duality.Time

The Time class provides a global interface for time measurement and control. It affects all time-dependent computations. Use the TimeMult Property to make your own computations time-dependent instead of frame-dependent. Otherwise, your game logic will depend on how many FPS the player's machine achieves and mit behave differently on very slow or fast machines.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Freeze ( ) : void

Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.

Resume ( ) : void

Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.

Приватные методы

Метод Описание
FrameTick ( bool forceFixedStep = false ) : void
Resume ( bool hardReset ) : void

Описание методов

Freeze() публичный статический Метод

Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.
public static Freeze ( ) : void
Результат void

Resume() публичный статический Метод

Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.
public static Resume ( ) : void
Результат void