Class Timer
Inheritance
System.Object
Timer
Namespace: SF
Assembly: cs.temp.dll.dll
Syntax
Constructors
Timer(Action)
Declaration
public Timer(Action onTimerComplete = null)
Parameters
| Type |
Name |
Description |
| Action |
onTimerComplete |
|
Timer(Single, Action)
Declaration
public Timer(float duration, Action onTimerComplete = null)
Parameters
| Type |
Name |
Description |
| System.Single |
duration |
|
| Action |
onTimerComplete |
|
Fields
Duration
Declaration
Field Value
| Type |
Description |
| System.Single |
|
ElapsedTimer
Declaration
public float ElapsedTimer
Field Value
| Type |
Description |
| System.Single |
|
RemainingTime
Declaration
public float RemainingTime
Field Value
| Type |
Description |
| System.Single |
|
TimerStopped
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
Methods
ResetTimer()
Declaration
StartTimerAsync()
Starts an async timer that when completed raises the
SF.Timer._onTimerComplete event.
Declaration
public async Awaitable<bool> StartTimerAsync()
Returns
| Type |
Description |
| Awaitable<System.Boolean> |
True when the timer is finished or false while the timer is currently counting down.
|
StopTimer()
Declaration
UpdateTimerAsync()
Tells the timer to start updating and counting down asynchronously and invokes the SF.Timer._onTimerComplete event when the timer reaches zero.
Declaration
public async Awaitable UpdateTimerAsync()
Returns
| Type |
Description |
| Awaitable |
|