A timer that is based on ticks instead of seconds. More...
Inherits INetworkStruct.
Public Member Functions | |
bool | Expired (NetworkRunner runner) |
Checks if the TickTimer has expired. More... | |
bool | ExpiredOrNotRunning (NetworkRunner runner) |
Checks if the TickTimer has expired or is not running. More... | |
int? | RemainingTicks (NetworkRunner runner) |
Gets the number of remaining ticks until the TickTimer expires. More... | |
float? | RemainingTime (NetworkRunner runner) |
Gets the remaining time in seconds until the TickTimer expires. More... | |
override string | ToString () |
Returns a string that represents the current TickTimer. More... | |
Static Public Member Functions | |
static TickTimer | CreateFromSeconds (NetworkRunner runner, float delayInSeconds) |
Creates a TickTimer from a specified delay in seconds. More... | |
static TickTimer | CreateFromTicks (NetworkRunner runner, int ticks) |
Creates a TickTimer from a specified number of ticks. More... | |
Public Attributes | |
int | _target |
Properties | |
bool | IsRunning [get] |
Gets a value indicating whether the TickTimer is running. More... | |
static TickTimer | None [get] |
Gets a TickTimer that is not running. More... | |
int? | TargetTick [get] |
Gets the target tick of the TickTimer. More... | |
A timer that is based on ticks instead of seconds.
|
static |
Creates a TickTimer from a specified delay in seconds.
runner | The NetworkRunner associated with the TickTimer. |
delayInSeconds | The delay in seconds to set the TickTimer to. |
|
static |
Creates a TickTimer from a specified number of ticks.
runner | The NetworkRunner associated with the TickTimer. |
ticks | The number of ticks to set the TickTimer to. |
bool Expired | ( | NetworkRunner | runner | ) |
Checks if the TickTimer has expired.
runner | The NetworkRunner associated with the TickTimer. |
bool ExpiredOrNotRunning | ( | NetworkRunner | runner | ) |
Checks if the TickTimer has expired or is not running.
runner | The NetworkRunner associated with the TickTimer. |
int? RemainingTicks | ( | NetworkRunner | runner | ) |
Gets the number of remaining ticks until the TickTimer expires.
runner | The NetworkRunner associated with the TickTimer. |
float? RemainingTime | ( | NetworkRunner | runner | ) |
Gets the remaining time in seconds until the TickTimer expires.
runner | The NetworkRunner associated with the TickTimer. |
override string ToString | ( | ) |
|
get |