Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionsingleusebase.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CASingleUse;
6  }
7 
8  override void OnAnimationEvent(int pEventID)
9  {
10  if ( m_ActionData )
11  {
12  if ( !m_Interrupted && pEventID == UA_ANIM_EVENT && m_ActionData.m_Action )
13  {
14  AnimatedActionBase action = AnimatedActionBase.Cast(m_ActionData.m_Action);
15  action.OnAnimationEvent(m_ActionData);
16  }
17  }
18  }
19 
20  override void InitActionComponent()
21  {
22  m_Interrupted = false;
23  m_Canceled = false;
24 
25  CreateActionComponent();
26  if ( m_ActionData.m_ActionComponent )
27  {
28  m_ActionData.m_ActionComponent.Init(m_ActionData);
29  }
30  m_ActionData.m_State = UA_PROCESSING;
32  m_SoundObject = m_ActionData.m_Action.PlayActionSound(m_ActionData.m_Player);
33  }
34 
35  override void EndActionComponent()
36  {
37  m_ActionData.m_State = UA_FINISHED;
38  }
39 };
40 
42 {
43  void ActionSingleUseBase()
44  {
45  m_CallbackClass = ActionSingleUseBaseCB;
46  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
47  }
48 
49  override typename GetInputType()
50  {
51  return DefaultActionInput;
52  }
53 
54  override int GetActionCategory()
55  {
56  return AC_SINGLE_USE;
57  }
58 };
CASingleUse
Definition: casingleuse.c:1
UA_ANIM_EVENT
const int UA_ANIM_EVENT
Definition: constants.c:443
DefaultActionInput
Definition: actioninput.c:630
ActionSingleUseBaseCB
Definition: actionsingleusebase.c:1
AnimatedActionBase
Definition: animatedactionbase.c:133
m_Canceled
bool m_Canceled
Definition: smptanimmeta.c:16
UA_FINISHED
const int UA_FINISHED
Definition: constants.c:436
RegisterAnimationEvent
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
m_Interrupted
bool m_Interrupted
Definition: actionmanagerbase.c:49
AC_SINGLE_USE
const int AC_SINGLE_USE
Definition: _constants.c:2
ActionSingleUseBase
Definition: actionsingleusebase.c:41
UA_PROCESSING
const int UA_PROCESSING
Definition: constants.c:434
ActionBaseCB
Definition: animatedactionbase.c:1