DIFF

class BotStateBaseSource

represent weapon state base

Class comes with entry/update/exit hooks that can be overriden in custom states

Class is ready for hierarchic composition, i.e. this state having a sub-machine running under hood. If no m_FSM member is configured, class acts as ordinary plain finite machine state.

Constructors 1

void BotStateBase(Bot bot = NULL, BotStateBase parent = NULL)
References m_Bot, m_Owner, Bot.m_Owner
Show 1 more, m_ParentState

Members 4

BotStateBase m_ParentState

hierarchical parent state of this state (or null)

Methods 15

void SetParentState(BotStateBase parent)

allows construction of hierarchical state machine

References m_ParentState
BotStateBase GetParentState()

Returns: state that owns this sub-state (or null if plain state)

References m_ParentState
bool HasFSM()
References m_FSM
BotFSM GetFSM()
References m_FSM
bool ProcessEvent(BotEventBase e)

adds transition into m_FSM transition table

References HFSMBase.AddTransition(), Error(), HasFSM()
Show 1 more, m_FSM
bool IsWaitingForActionFinish()

waiting for active animation action/actionType finish

Returns: true if this state or active substate is waiting for finish signal

References HFSMBase.GetCurrentState(), HasFSM(), HFSMBase.IsRunning()
Show 2 more, IsWaitingForActionFinish(), and m_FSM
bool IsIdle()

idle state does not expect any animation events

Returns: true if this state is idle

void OnSubMachineChanged(BotStateBase src, BotStateBase dst)

called when sub-machine has changed its state

in src
from state (previous)
in dst
to state (current)
void OnStateChanged(BotStateBase src, BotStateBase dst)

called on current state when state machine has changed its state

in src
from state (previous)
in dst
to state (current)