Class State
Represents a single state within a IStateMachine
Inheritance
System.Object
State
Implements
Namespace: Atlas
Assembly: Atlas.Runtime.dll
Syntax
public abstract class State : ITickable
Constructors
| Improve this Doc View SourceState()
Constructor
Declaration
public State()
Properties
| Improve this Doc View SourceStateLinks
Links to other states
Declaration
public List<IStateLink> StateLinks { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<IStateLink> |
StateMachine
The IStateMachine that owns this state
Declaration
public IStateMachine StateMachine { get; set; }
Property Value
Type | Description |
---|---|
IStateMachine |
Methods
| Improve this Doc View SourceAddStateLink(IStateLink)
Adds a link to another state
Declaration
public void AddStateLink(IStateLink link)
Parameters
Type | Name | Description |
---|---|---|
IStateLink | link | The link to add |
AddStateLink(State, StateLink.TransitionCondition)
Adds a link to another state
Declaration
public void AddStateLink(State nextState, StateLink.TransitionCondition condition)
Parameters
Type | Name | Description |
---|---|---|
State | nextState | The state to transition to when the given condition is satisfied |
StateLink.TransitionCondition | condition | The condition used to evaluate if this link is satisfied |
Enter()
Called when the state is entered
Declaration
public virtual void Enter()
Exit()
Called when the state is exited
Declaration
public virtual void Exit()
Tick()
Called when the state is updated
Declaration
public virtual void Tick()