Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
cabase.c
Go to the documentation of this file.
1class CABase
2{
4 protected float m_LastTick;
5 protected ref Param m_ACData;
7
8 void Init( ActionData action_data )
9 {
11 m_Action = action_data.m_Action;
12 if ( !m_ACData )
13 {
14 m_ACData = new Param;
15 }
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
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
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};
Definition cabase.c:2
int Execute(ActionData action_data)
Definition cabase.c:24
void SetACData(Param units)
Definition cabase.c:40
bool IsContinuousAction()
Definition cabase.c:57
int Interrupt(ActionData action_data)
Definition cabase.c:34
float GetProgress()
Definition cabase.c:62
void Setup(ActionData action_data)
Definition cabase.c:20
Param GetACData()
Definition cabase.c:48
float GetProgressWidgetMultiplier()
Definition cabase.c:67
ActionBase m_Action
Definition cabase.c:3
void Init(ActionData action_data)
Definition cabase.c:8
ref Param2< float, float > m_ProgressParam
Definition cabase.c:6
ref Param m_ACData
Definition cabase.c:5
int Cancel(ActionData action_data)
Definition cabase.c:29
float m_LastTick
Definition cabase.c:4
proto int GetTime()
returns mission time in milliseconds
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
proto native CGame GetGame()
class Test Setup
Stage definition used in conjunction with Step attribute.
const int UA_ERROR
Definition constants.c:485
const int UA_CANCEL
Definition constants.c:467