C# Класс AStateMachine, PocketGodsRPG_Proto

An instantiable/inheritable state machine reusable for complex components. Only acts as a data structure By: NeilDG
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
currentState AState,
initialState AState,

Открытые методы

Метод Описание
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!

Описание методов

GetCurrentState() публичный Метод

public GetCurrentState ( ) : AState,
Результат AState,

GetCurrentStateLabel() публичный Метод

public GetCurrentStateLabel ( ) : string
Результат string

InitializeStateTransitions() публичный абстрактный Метод

Put all state initialization and state transitions here!
public abstract InitializeStateTransitions ( ) : void
Результат void

OnUpdate() публичный Метод

Raises the update event. Call this if you want this state machine to perform actions on Unity Update
public OnUpdate ( ) : void
Результат void

SetInitialState() публичный Метод

public SetInitialState ( AState, initialState ) : void
initialState AState,
Результат void

TransitionTo() публичный Метод

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
Результат void

Описание свойств

currentState защищенное свойство

protected AState, currentState
Результат AState,

initialState защищенное свойство

protected AState, initialState
Результат AState,