3 void HandStartReplacingItemInHands (Man player = NULL, HandStateBase parent = NULL)
10 Man player = e.m_Player;
11 EntityAI itemInHands = player.GetEntityInHands();
13 InventoryLocation src =
new InventoryLocation;
14 if (itemInHands.GetInventory().GetCurrentInventoryLocation(src))
16 HandEventDestroyAndReplaceWithNew edr = HandEventDestroyAndReplaceWithNew.Cast(e);
19 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[hndfsm] HandStartReplacingItemInHands about to execute lambda");
21 HumanInventoryWithFSM inv = HumanInventoryWithFSM.Cast(player.GetInventory());
22 edr.m_Lambda.Execute(inv);
27 Error(
"[hndfsm] HandStartReplacingItemInHands - not a HandEventDestroyAndReplaceWithNew event");
30 Error(
"[hndfsm] HandStartReplacingItemInHands - itemInHands has no InventoryLocation");
49 ref HandStartReplacingItemInHands m_Replacing;
51 void HandReplacingItemInHands (Man player = NULL, HandStateBase parent = NULL)
54 m_Replacing =
new HandStartReplacingItemInHands(player,
this);
57 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
59 m_FSM =
new HandFSM(
this);
61 m_FSM.AddTransition(
new HandTransition( m_Replacing, _fin_, NULL ));
63 m_FSM.SetInitialState(m_Replacing);
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