C# Class AStateMachine, PocketGodsRPG_Proto

An instantiable/inheritable state machine reusable for complex components. Only acts as a data structure By: NeilDG
Afficher le fichier Open project: pocket-playlab/PocketGodsRPG_Proto Class Usage Examples

Protected Properties

Свойство Type Description
currentState AState,
initialState AState,

Méthodes publiques

Méthode Description
GetCurrentState ( ) : AState,
GetCurrentStateLabel ( ) : string
InitializeStateTransitions ( ) : void

Put all state initialization and state transitions here!

OnUpdate ( ) : void

Raises the update event. Call this if you want this state machine to perform actions on Unity Update

SetInitialState ( AState, initialState ) : void
TransitionTo ( string stateLabel ) : void

Transitions the current state to its next state. Will not transition if the current state do not have any next state!

Method Details

GetCurrentState() public méthode

public GetCurrentState ( ) : AState,
Résultat AState,

GetCurrentStateLabel() public méthode

public GetCurrentStateLabel ( ) : string
Résultat string

InitializeStateTransitions() public abstract méthode

Put all state initialization and state transitions here!
public abstract InitializeStateTransitions ( ) : void
Résultat void

OnUpdate() public méthode

Raises the update event. Call this if you want this state machine to perform actions on Unity Update
public OnUpdate ( ) : void
Résultat void

SetInitialState() public méthode

public SetInitialState ( AState, initialState ) : void
initialState AState,
Résultat void

TransitionTo() public méthode

Transitions the current state to its next state. Will not transition if the current state do not have any next state!
public TransitionTo ( string stateLabel ) : void
stateLabel string
Résultat void

Property Details

currentState protected_oe property

protected AState, currentState
Résultat AState,

initialState protected_oe property

protected AState, initialState
Résultat AState,