TimedFlag Class

Definition

Represents a flag that can be activated or deactivated, and whose active duration is tracked and obtained via the GetTimeElapsedSinceSetActive() function. Instances of this object will also raise OnEntered and OnExited events when their activate state is altered.

C#
[System.Serializable]
public class TimedFlag
Inheritance
TimedFlag
Attributes

Constructors

Properties

Active

Whether or not the state is currently active.

EndTime

The time this state was set to inactive (active = false)

OnEntered

Fired when the state is set to active. Float argument is the time at which the event occurred.

OnExited

Fired when the state is set to active. Float argument is the time at which the event occurred.

StartTime

The time this state was set to active

Methods

GetTimeElapsedSinceSetActive()

Get the amount of time that has passed since this state was set to active.

Initialize(Boolean)

Initialize the state to a particular value, without firing any events or listeners.

ToString()

Returns a string that represents the current object.

Operators

Implicit(TimedFlag to Boolean)

Convert a TimedFlag to bool based on the value of Active.

Applies to

Proizvod Verzije
MRTK3 Core Definitions 3.0, 3.1, 3.2