Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
cabase.c
Go to the documentation of this file.
1
class
CABase
2
{
3
protected
ActionBase
m_Action
;
4
protected
float
m_LastTick
;
5
protected
ref
Param
m_ACData
;
6
protected
ref
Param2<float,float>
m_ProgressParam
;
7
8
void
Init
(
ActionData
action_data )
9
{
10
m_ProgressParam
=
new
Param2<float,float>
(0,0);
11
m_Action
= action_data.m_Action;
12
if
( !
m_ACData
)
13
{
14
m_ACData
=
new
Param
;
15
}
16
m_LastTick
=
g_Game
.GetTime();
17
Setup
(action_data);
18
}
19
20
void
Setup
(
ActionData
action_data )
21
{
22
}
23
24
int
Execute
(
ActionData
action_data )
25
{
26
return
UA_ERROR
;
27
}
28
29
int
Cancel
(
ActionData
action_data )
30
{
31
return
UA_CANCEL
;
32
}
33
34
int
Interrupt
(
ActionData
action_data )
35
{
36
Cancel
( action_data );
37
return
UA_CANCEL
;
38
}
39
40
void
SetACData
(
Param
units)
//overload this method if you want to send more than one parameter out of the action component
41
{
42
if
(
m_ACData
)
43
{
44
m_ACData
= units;
45
}
46
}
47
48
Param
GetACData
()
49
{
50
if
(
m_ACData
)
51
{
52
return
m_ACData
;
53
}
54
return
NULL;
55
}
56
57
bool
IsContinuousAction
()
//informs command callback whether action is looped or oneshot
58
{
59
return
false
;
60
}
61
62
float
GetProgress
()
63
{
64
return
0;
65
}
66
67
float
GetProgressWidgetMultiplier
()
// override when action length is not supposed to be the same length as progress widge
68
{
69
return
1;
70
}
71
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionBase
Definition
actionbase.c:59
CABase
Definition
cabase.c:2
CABase::IsContinuousAction
bool IsContinuousAction()
Definition
cabase.c:57
CABase::GetACData
Param GetACData()
Definition
cabase.c:48
CABase::m_LastTick
float m_LastTick
Definition
cabase.c:4
CABase::Setup
void Setup(ActionData action_data)
Definition
cabase.c:20
CABase::SetACData
void SetACData(Param units)
Definition
cabase.c:40
CABase::Cancel
int Cancel(ActionData action_data)
Definition
cabase.c:29
CABase::GetProgressWidgetMultiplier
float GetProgressWidgetMultiplier()
Definition
cabase.c:67
CABase::m_ProgressParam
ref Param2< float, float > m_ProgressParam
Definition
cabase.c:6
CABase::Interrupt
int Interrupt(ActionData action_data)
Definition
cabase.c:34
CABase::m_Action
ActionBase m_Action
Definition
cabase.c:3
CABase::Execute
int Execute(ActionData action_data)
Definition
cabase.c:24
CABase::m_ACData
ref Param m_ACData
Definition
cabase.c:5
CABase::Init
void Init(ActionData action_data)
Definition
cabase.c:8
CABase::GetProgress
float GetProgress()
Definition
cabase.c:62
Param2
Definition
ppeconstants.c:68
Param
Base Param Class with no parameters.
Definition
param.c:12
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Setup
class Test Setup
Stage definition used in conjunction with Step attribute.
UA_ERROR
const int UA_ERROR
Definition
constants.c:488
UA_CANCEL
const int UA_CANCEL
Definition
constants.c:470
Cancel
proto native void Cancel()
cancels action
Games
Dayz
scripts
4_world
classes
useractionscomponent
actioncomponents
cabase.c
Generated by
1.17.0