Language
Edit

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.

[System.Serializable]
public class TimedFlag
[<System.Serializable>]
type TimedFlag = class
Public Class TimedFlag
Inheritance
TimedFlag
Attributes

Constructors

Name Description
TimedFlag()

Properties

Name Description
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

Name Description
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

Name Description
Implicit(TimedFlag to Boolean)

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

Applies to