91 m_state = m_initialState;
118 m_state.OnUpdate(
dt);
126 m_transitions.Insert(
t);
138 int count = m_transitions.Count();
142 if (
row.m_srcState.Type() ==
curr_state.Type() &&
row.m_event.Type() ==
e.Type())
148 ProcessLocalTransition(
t,
e);
168 t.m_action.Action(
e);
170 m_state =
t.m_dstState;
172 if (
t.m_dstState !=
NULL)
ref HandEventBase m_event
void fsmbDebugPrint(string s)
void fsmbDebugSpam(string s)
class WeaponEndAction extends WeaponStartAction m_action
Super root of all classes in Enforce script.
ProcessEventResult ProcessEvent(FSMEventBase e)
instructs the state machine to process the event e
void FSMBase()
fsm transition table
bool IsRunning()
returns true if machine is in running state
FSMStateBase GetCurrentState()
returns currently active state
void Terminate(FSMEventBase terminal_event=NULL)
terminates the state machine
void Start(FSMEventBase initial_event=NULL)
starts the state machine by entering the initial_state (using intial_event as argument to initial sta...
void SetInitialState(FSMStateBase initial_state)
sets the initial_state for starting the machine
ProcessEventResult ProcessLocalTransition(FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t, FSMEventBase e)
instructs the state machine to process the event locally - no hierarchy is crossed
ref array< ref FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > > m_transitions
configurable initial event to start the machine (null by default)
ref FSMStateBase m_initialState
current fsm state
void Update(float dt)
if machine running, call OnUpdate() on current state
ref FSMEventBase m_initialEvent
configurable initial state of the machine
void AddTransition(FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t)
adds transition into transition table
base class for finite state machine
ref FSMStateBase m_dstState
ref FSMStateBase m_srcState
void FSMTransition(FSMStateBase src, FSMEventBase e, FSMStateBase dst, FSMActionBase a=NULL, FSMGuardBase g=NULL)
ref FSMActionBase m_action
represents transition src -— event[guard]/action -—|> dst
static bool IsInventoryHFSMLogEnable()
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...