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)
represent weapon state base
bool IsIdle()
idle state does not expect any animation events
void OnSubMachineChanged(BotStateBase src, BotStateBase dst)
called when sub-machine has changed its state
void OnStateChanged(BotStateBase src, BotStateBase dst)
called on current state when state machine has changed its state
ref BotFSM m_FSM
hierarchical parent state of this state (or null)
bool ProcessEvent(BotEventBase e)
void BotStateBase(Bot bot=NULL, BotStateBase parent=NULL)
nested state machine (or null)
void OnExit(BotEventBase e)
bool IsWaitingForActionFinish()
waiting for active animation action/actionType finish
BotStateBase GetParentState()
PlayerBase GetPlayerOwner()
void OnEntry(BotEventBase e)
void AddTransition(FSMTransition< BotStateBase, BotEventBase, BotActionBase, BotGuardBase > t)
adds transition into m_FSM transition table
void SetParentState(BotStateBase parent)
allows construction of hierarchical state machine
Bot m_Bot
man that this state belongs to
void OnAbort(BotEventBase e)
BotStateBase m_ParentState
bot that this state belongs to
void BotStateIdle(Bot bot=NULL, BotStateBase parent=NULL)
represents transition src -— event[guard]/action -—|> dst
void Error(string err)
Messagebox with error message.