9 HandStateBase m_parentState;
11 void HandStateBase (Man player = NULL, HandStateBase parent = NULL) { m_Player = player; m_parentState = parent; }
16 void SetParentState (HandStateBase parent) { m_parentState = parent; }
20 HandStateBase GetParentState () {
return m_parentState; }
22 bool HasFSM () {
return m_FSM != NULL; }
23 HandFSM GetFSM () {
return m_FSM; }
28 return m_FSM.ProcessEvent(e);
38 m_FSM.AddTransition(t);
40 Error(
"[hndfsm] adding transition to state without FSM. Configure FSM first.");
51 if (HasFSM() && !m_FSM.IsRunning())
55 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] { " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" " +
this.Type().ToString() +
" Has Sub-FSM! Starting submachine... OnEntry");
59 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] { " + this.
Type().
ToString() +
" Has Sub-FSM! Starting submachine... OnEntry");
67 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] { " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" " +
this.Type().ToString() +
" OnEntry");
83 if (HasFSM() && m_FSM.IsRunning())
84 m_FSM.GetCurrentState().OnUpdate(dt);
93 if (HasFSM() && m_FSM.IsRunning())
95 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] OnAbort " + this.
Type().
ToString() +
" Has Sub-FSM! Aborting submachine... OnAbort");
99 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] } " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" ABORTED " +
this.Type().ToString() +
" OnAbort");
108 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] } " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" " +
this.Type().ToString() +
" OnExit");
115 bool IsWaitingForActionFinish () {
return HasFSM() && m_FSM.IsRunning() && m_FSM.GetCurrentState().IsWaitingForActionFinish(); }
121 bool IsIdle () {
return false; }
128 void OnSubMachineChanged (HandStateBase src, HandStateBase dst) { }
135 void OnStateChanged (HandStateBase src, HandStateBase dst)
137 m_Player.GetHumanInventory().OnHandsStateChanged(src, dst);
represent hand state base
void Error(string err)
Messagebox with error message.
void HandEventBase(Man p=null, InventoryLocation src=null)
HandStateEquipped OnEntry
void hndDebugPrint(string s)
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit