Click or drag to resize

TimedStateTrackerTStateData Class

The same as StateTracker, but states can also time out.
Inheritance Hierarchy
SystemObject
  Gamelogic.ExtensionsTimedStateTrackerTStateData

Namespace:  Gamelogic.Extensions
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class TimedStateTracker<TStateData>

Type Parameters

TStateData
The type of the t state data.

The TimedStateTrackerTStateData type exposes the following members.

Constructors
  NameDescription
Public methodTimedStateTrackerTStateData
Initializes a new instance of the TimedStateTrackerTStateData class.
Top
Properties
  NameDescription
Public propertyActiveTokens
Returns all the active tokens: tokens returned when states has been started that has not yet been stopped.
Public propertyIsActive
Gets a value indicating whether this tracker is active, that is, whether any state has been started that has not been stopped.
Public propertyIsPaused
Gets a value indicating whether this tracker is paused.
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPause
Pauses this tracker.
Public methodStartState(TStateData, Single)
Starts a state, and returns a token that can be used to stop it again.
Public methodStartState(TStateData, Single, Action)
Starts a state, and returns a token that can be used to stop it again.
Public methodStopState
Stops the state associated with the token. The token must be one that was returned when the state was started.
Public methodToString (Inherited from Object.)
Public methodUnpause
Unpauses this tracker.
Public methodUpdate
Updates this tracker with the specified current time.
Top
Events
  NameDescription
Public eventOnStateActive
Occurs when this tracker is inactive and a state is started (so that this tracker becomes active).
Public eventOnStateInactive
Occurs when all active states are stopped, that is, when this tracker is active and becomes inactive.
Top
Extension Methods
  NameDescription
Public Extension MethodThrowIfNull
Throws a NullReferenceException if the object is null.
(Defined by ObjectExtensions.)
Top
Remarks
Time-outs are managed by this class: when the state times out, it is stopped, and an event is raised. This tracker must be updated (typically in a mono-behaviour Update method).
See Also