C# Класс RedBlueGames.Tools.RBTimer

Показать файл Открыть проект

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

Метод Описание
GetTimeRemaining ( ) : float

Gets the time remaining.

IsUnset ( ) : bool

Determines whether this instance is unset.

RBTimer ( ) : System.Collections

Initializes a new instance of the RBTimer class without a Duration

RBTimer ( float timerDuration, bool repeats = false ) : System.Collections

Initializes a new instance of the RBTimer class with a duration.

Start ( MonoBehaviour targetMonobehaviour, System timerFinishedAction = null ) : void

Start the timer, attached to the specified targetMonobehaviour. Raises timerFinishedAction when complete.

Stop ( ) : void

Stop this timer, without calling the Finished action.

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

Метод Описание
CountdownForDuration ( float desiredDuration ) : IEnumerator
DoStart ( ) : void
StartTimerCoroutine ( float waitSeconds ) : void
StopTimerCoroutine ( ) : void
TimerFinished ( ) : void

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

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

Gets the time remaining.
public GetTimeRemaining ( ) : float
Результат float

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

Determines whether this instance is unset.
public IsUnset ( ) : bool
Результат bool

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

Initializes a new instance of the RBTimer class without a Duration
public RBTimer ( ) : System.Collections
Результат System.Collections

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

Initializes a new instance of the RBTimer class with a duration.
public RBTimer ( float timerDuration, bool repeats = false ) : System.Collections
timerDuration float Timer duration.
repeats bool If set to true, timer will repeat after it completes.
Результат System.Collections

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

Start the timer, attached to the specified targetMonobehaviour. Raises timerFinishedAction when complete.
public Start ( MonoBehaviour targetMonobehaviour, System timerFinishedAction = null ) : void
targetMonobehaviour UnityEngine.MonoBehaviour Target monobehaviour to attach Coroutine to.
timerFinishedAction System Action invoked on timer complete.
Результат void

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

Stop this timer, without calling the Finished action.
public Stop ( ) : void
Результат void