36 return m_FSM.ProcessEvent(e);
46 m_FSM.AddTransition(t);
48 Error(
"[botfsm] adding transition to state without FSM. Configure FSM first.");
76 m_FSM.GetCurrentState().OnUpdate(dt);
void botDebugPrint(string s)
represents event that triggers transition from state to state
Bot Finite State Machine (Hierarchical)
BotStateBase m_ParentState
bot that this state belongs to
void OnEntry(BotEventBase e)
void BotStateBase(Bot bot=NULL, BotStateBase parent=NULL)
nested state machine (or null)
bool IsWaitingForActionFinish()
waiting for active animation action/actionType finish
ref BotFSM m_FSM
hierarchical parent state of this state (or null)
void OnAbort(BotEventBase e)
BotStateBase GetParentState()
void OnSubMachineChanged(BotStateBase src, BotStateBase dst)
called when sub-machine has changed its state
void AddTransition(FSMTransition< BotStateBase, BotEventBase, BotActionBase, BotGuardBase > t)
adds transition into m_FSM transition table
PlayerBase GetPlayerOwner()
bool IsIdle()
idle state does not expect any animation events
void SetParentState(BotStateBase parent)
allows construction of hierarchical state machine
void OnStateChanged(BotStateBase src, BotStateBase dst)
called on current state when state machine has changed its state
bool ProcessEvent(BotEventBase e)
void OnExit(BotEventBase e)
Bot m_Bot
man that this state belongs to
represent weapon state base
void BotStateIdle(Bot bot=NULL, BotStateBase parent=NULL)
represents transition src -— event[guard]/action -—|> dst
void Error(string err)
Messagebox with error message.