C# Класс UnityCommonLibrary.Time.UTimer

A timer that either operates in a standard timer or a stopwatch mode.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
allReadonly ReadOnlyCollection
duration float
timeMode TimeMode

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

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

If currently running, pauses the timer.

Reset ( ) : void

Resets all readonly public and private timer counters.

Restart ( ) : void

Resets and starts the timer.

Resume ( ) : void

If currently paused, resumes the timer.

Start ( ) : void

If currently stopped, resets and then starts the timer.

Stop ( ) : void

If not currently stopped, stops the timer.

TickAll ( ) : void

This must be called by some external script for timers to update.

ToString ( ) : string
UTimer ( ) : System

Creates and Resets a new timer in Timer Mechanism in Time TimeMode.

UTimer ( Mechanism mechanism ) : System

Creates and Resets a new timer in Time TimeMode.

UTimer ( Mechanism mechanism, TimeMode timeMode ) : System

Creates and Resets a new timer.

UTimer ( TimeMode timeMode ) : System

Creates and Resets a new timer in Timer Mechanism.

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

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

Updates the timer's counters and values.

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

Pause() публичный Метод

If currently running, pauses the timer.
public Pause ( ) : void
Результат void

Reset() публичный Метод

Resets all readonly public and private timer counters.
public Reset ( ) : void
Результат void

Restart() публичный Метод

Resets and starts the timer.
public Restart ( ) : void
Результат void

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

If currently paused, resumes the timer.
public Resume ( ) : void
Результат void

Start() публичный Метод

If currently stopped, resets and then starts the timer.
public Start ( ) : void
Результат void

Stop() публичный Метод

If not currently stopped, stops the timer.
public Stop ( ) : void
Результат void

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

This must be called by some external script for timers to update.
public static TickAll ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

UTimer() публичный Метод

Creates and Resets a new timer in Timer Mechanism in Time TimeMode.
public UTimer ( ) : System
Результат System

UTimer() публичный Метод

Creates and Resets a new timer in Time TimeMode.
public UTimer ( Mechanism mechanism ) : System
mechanism Mechanism The directional mechanism to use.
Результат System

UTimer() публичный Метод

Creates and Resets a new timer.
public UTimer ( Mechanism mechanism, TimeMode timeMode ) : System
mechanism Mechanism The directional mechanism to use.
timeMode TimeMode The time counting mode to use.
Результат System

UTimer() публичный Метод

Creates and Resets a new timer in Timer Mechanism.
public UTimer ( TimeMode timeMode ) : System
timeMode TimeMode The time counting mode to use.
Результат System

Описание свойств

allReadonly публичное статическое свойство

A readonly wrapper for allTimers
public static ReadOnlyCollection allReadonly
Результат ReadOnlyCollection

duration публичное свойство

How long the timer takes to elapse in either direction.
public float duration
Результат float

timeMode публичное свойство

The method in which to determine time.
public TimeMode timeMode
Результат TimeMode