DayZ 1.24
Loading...
Searching...
No Matches
CABase.c
Go to the documentation of this file.
1class CABase
2{
3 protected ActionBase m_Action;
4 protected float m_LastTick;
5 protected ref Param m_ACData;
7
9 {
11 m_Action = action_data.m_Action;
12 if (!m_ACData)
13 m_ACData = new Param;
14 m_LastTick = GetGame().GetTime();
16 }
17
19 {
20 }
21
23 {
24 return UA_ERROR;
25 }
26
28 {
29 return UA_CANCEL;
30 }
31
37
38 void SetACData(Param units) //overload this method if you want to send more than one parameter out of the action component
39 {
40 if (m_ACData)
41 m_ACData = units;
42 }
43
45 {
46 if (m_ACData)
47 return m_ACData;
48 return NULL;
49 }
50
51 bool IsContinuousAction() //informs command callback whether action is looped or oneshot
52 {
53 return false;
54 }
55
57 {
58 return 0;
59 }
60};
Definition CABase.c:2
int Execute(ActionData action_data)
Definition CABase.c:22
void SetACData(Param units)
Definition CABase.c:38
bool IsContinuousAction()
Definition CABase.c:51
int Interrupt(ActionData action_data)
Definition CABase.c:32
float GetProgress()
Definition CABase.c:56
void Setup(ActionData action_data)
Definition CABase.c:18
Param GetACData()
Definition CABase.c:44
ActionBase m_Action
Definition CABase.c:3
void Init(ActionData action_data)
Definition CABase.c:8
ref Param m_ACData
Definition CABase.c:5
int Cancel(ActionData action_data)
Definition CABase.c:27
float m_LastTick
Definition CABase.c:4
ref Param2< float, float > m_ProgressParam
Definition CABase.c:6
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
proto native CGame GetGame()
const int UA_ERROR
Definition constants.c:455
const int UA_INTERRUPT
Definition constants.c:438
const int UA_CANCEL
Definition constants.c:437
proto native void Cancel()
cancels action