C# Class RedBlueGames.Tools.RBTimer

Afficher le fichier Open project: redbluegames/rb-unity-tools

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
CountdownForDuration ( float desiredDuration ) : IEnumerator
DoStart ( ) : void
StartTimerCoroutine ( float waitSeconds ) : void
StopTimerCoroutine ( ) : void
TimerFinished ( ) : void

Method Details

GetTimeRemaining() public méthode

Gets the time remaining.
public GetTimeRemaining ( ) : float
Résultat float

IsUnset() public méthode

Determines whether this instance is unset.
public IsUnset ( ) : bool
Résultat bool

RBTimer() public méthode

Initializes a new instance of the RBTimer class without a Duration
public RBTimer ( ) : System.Collections
Résultat System.Collections

RBTimer() public méthode

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.
Résultat System.Collections

Start() public méthode

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.
Résultat void

Stop() public méthode

Stop this timer, without calling the Finished action.
public Stop ( ) : void
Résultat void