Class StateController
The base controller which handles actors using in-context states.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.API.Features.Core.StateMachine
Assembly: Exiled.API.dll
Syntax
public abstract class StateController : EActor, IEntity, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceBeginStateMulticastDispatcher
Gets or sets the TDynamicEventDispatcher<T> which handles all the delegates fired when entering a new state.
Declaration
public TDynamicEventDispatcher<State> BeginStateMulticastDispatcher { get; protected set; }
Property Value
| Type | Description |
|---|---|
| TDynamicEventDispatcher<State> |
CurrentState
Gets or sets the current state.
Declaration
public State CurrentState { get; set; }
Property Value
| Type | Description |
|---|---|
| State |
EndStateMulticastDispatcher
Gets or sets the TDynamicEventDispatcher<T> which handles all the delegates fired when exiting the current state.
Declaration
public TDynamicEventDispatcher<State> EndStateMulticastDispatcher { get; protected set; }
Property Value
| Type | Description |
|---|---|
| TDynamicEventDispatcher<State> |
PreviousState
Gets or sets the previous state.
Declaration
public State PreviousState { get; protected set; }
Property Value
| Type | Description |
|---|---|
| State |
States
Gets all handled states.
Declaration
public IEnumerable<State> States { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<State> |
Methods
| Improve this Doc View SourceOnStateChanged()
Fired when the state is changed.
Declaration
protected virtual void OnStateChanged()
StateUpdate(State)
Fired every tick from the current state.
Declaration
public virtual void StateUpdate(State state)
Parameters
| Type | Name | Description |
|---|---|---|
| State | state | The state firing the update. |