DayZ
1.24
Loading...
Searching...
No Matches
ActionSingleUseBase.c
Go to the documentation of this file.
1
class
ActionSingleUseBaseCB
:
ActionBaseCB
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
m_ActionData
.
m_ActionComponent
.Init(
m_ActionData
);
28
m_ActionData
.
m_State
=
UA_PROCESSING
;
29
RegisterAnimationEvent
(
"ActionExec"
,
UA_ANIM_EVENT
);
30
m_SoundObject
=
m_ActionData
.
m_Action
.PlayActionSound(
m_ActionData
.
m_Player
);
31
}
32
33
override
void
EndActionComponent
()
34
{
35
m_ActionData
.
m_State
=
UA_FINISHED
;
36
}
37
};
38
39
class
ActionSingleUseBase
:
AnimatedActionBase
40
{
41
void
ActionSingleUseBase
()
42
{
43
m_CallbackClass
=
ActionSingleUseBaseCB
;
44
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_PICKUP_HANDS;
45
}
46
47
override
typename
GetInputType
()
48
{
49
return
DefaultActionInput
;
50
}
51
52
override
int
GetActionCategory
()
53
{
54
return
AC_SINGLE_USE
;
55
}
56
};
AC_SINGLE_USE
const int AC_SINGLE_USE
Definition
_constants.c:2
RegisterAnimationEvent
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
ActionBaseCB
Definition
AnimatedActionBase.c:2
ActionBaseCB::m_Interrupted
bool m_Interrupted
Definition
AnimatedActionBase.c:6
ActionBaseCB::m_Canceled
bool m_Canceled
Definition
AnimatedActionBase.c:5
ActionBaseCB::m_SoundObject
SoundOnVehicle m_SoundObject
Definition
AnimatedActionBase.c:4
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionData::m_Player
PlayerBase m_Player
Definition
ActionBase.c:33
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionData::m_State
int m_State
Definition
ActionBase.c:31
ActionData::m_Action
ref ActionBase m_Action
Definition
ActionBase.c:27
ActionSingleUseBaseCB
Definition
ActionSingleUseBase.c:2
ActionSingleUseBaseCB::OnAnimationEvent
override void OnAnimationEvent(int pEventID)
Definition
ActionSingleUseBase.c:8
ActionSingleUseBaseCB::InitActionComponent
override void InitActionComponent()
Definition
ActionSingleUseBase.c:20
ActionSingleUseBaseCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionSingleUseBase.c:3
ActionSingleUseBaseCB::EndActionComponent
override void EndActionComponent()
Definition
ActionSingleUseBase.c:33
ActionSingleUseBase
Definition
ActionSingleUseBase.c:40
ActionSingleUseBase::GetActionCategory
override int GetActionCategory()
Definition
ActionSingleUseBase.c:52
ActionSingleUseBase::GetInputType
override GetInputType()
Definition
ActionSingleUseBase.c:47
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
ActionSingleUseBase.c:41
AnimatedActionBase
Definition
AnimatedActionBase.c:121
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CASingleUse
Definition
CASingleUse.c:2
DefaultActionInput
Definition
ActionInput.c:610
Param3
Definition
EntityAI.c:95
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
UA_FINISHED
const int UA_FINISHED
Definition
constants.c:436
UA_ANIM_EVENT
const int UA_ANIM_EVENT
Definition
constants.c:443
UA_PROCESSING
const int UA_PROCESSING
Definition
constants.c:434
scripts
4_World
Classes
UserActionsComponent
Actions
ActionSingleUseBase.c
Generated by
1.10.0