Click or drag to resize
DigitalRuneTransition Class
Defines a transition between two states.
Inheritance Hierarchy
SystemObject
  DigitalRune.Game.StatesTransition

Namespace: DigitalRune.Game.States
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
public class Transition : INamedObject

The Transition type exposes the following members.

Constructors
  NameDescription
Public methodTransition
Initializes a new instance of the Transition class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFire
Fires this transition.
Public methodFire(Object, EventArgs)
Fires this transition. (Event handler signature)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnAction
Raises the Action event.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyDelay
Gets or sets the time delay.
Public propertyFireAlways
Gets or sets a value indicating whether this transition should fire always.
Public propertyGuard
Gets or sets the guard predicate.
Public propertyName
Gets or sets the name of the state.
Public propertySourceState
Gets or sets the source state.
Public propertyTargetState
Gets or sets the target state.
Top
Events
  NameDescription
Public eventAction
Occurs when the transition is performed.
Top
Remarks

A transition changes the active state from SourceState to TargetState. It "fires" if Fire was called and the Guard condition evaluates to . The Fire(Object, EventArgs) method has an event handler signature, so it can be connect to a standard .NET event.

The Action event is raised when a transition is performed. Transitions are performed at the beginning of StateMachine.Update(TimeSpan).

See Also