16 void SetParentState (
HandStateBase parent) { m_parentState = parent; }
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...");
67 if (
LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] { " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" " +
this.Type().ToString());
81 void OnUpdate (
float dt)
83 if (HasFSM() && m_FSM.IsRunning())
84 m_FSM.GetCurrentState().OnUpdate(dt);
93 if (HasFSM() && m_FSM.IsRunning())
99 if (
LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] } " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" ABORTED " +
this.Type().ToString());
108 if (
LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] } " +
Object.GetDebugName(e.m_Player) +
" STS = " + e.m_Player.GetSimulationTimeStamp() +
" " +
this.Type().ToString());
115 bool IsWaitingForActionFinish () {
return HasFSM() && m_FSM.IsRunning() && m_FSM.GetCurrentState().IsWaitingForActionFinish(); }
121 bool IsIdle () {
return false; }
137 m_Player.GetHumanInventory().OnHandsStateChanged(src, dst);