C# Класс hyades.utils.Timer

An object that invokes an action after an amount of time has elapsed and optionally continues repeating until told to stop.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
tag object
tickLength float
time float

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

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

Forces the timer to fire its tick event, invalidating the timer unless it is set to repeat.

Stop ( ) : void

Stops the timer.

Timer ( float length, bool repeats, Action tick ) : System

Creates a new Timer.

Update ( double elapsed ) : void

Updates the timer.

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

Метод Описание
Reset ( float l, bool r, Action t ) : void
Timer ( ) : System

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

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

Forces the timer to fire its tick event, invalidating the timer unless it is set to repeat.
public ForceTick ( ) : void
Результат void

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

Stops the timer.
public Stop ( ) : void
Результат void

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

Creates a new Timer.
public Timer ( float length, bool repeats, Action tick ) : System
length float The length of time between ticks.
repeats bool Whether or not the timer repeats.
tick Action The delegate to invoke when the timer ticks.
Результат System

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

Updates the timer.
public Update ( double elapsed ) : void
elapsed double
Результат void

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

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

public object tag
Результат object

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

public float tickLength
Результат float

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

public float time
Результат float