DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionVariantsManager.c
Go to the documentation of this file.
2{
4 protected typename m_type;
5 protected ref ScriptInvoker e_OnUpdate;
6
7 void ActionVariantManager( typename type )
8 {
9 m_type = type;
12 }
13
15 {
16 return e_OnUpdate;
17 }
18
19 void Clear()
20 {
21 m_VariantActions.Clear();
22 }
23
24 void SetActionVariantCount( int count )
25 {
26 if ( count < m_VariantActions.Count() )
27 {
28 m_VariantActions.Clear();
29 }
30
31 for (int i = m_VariantActions.Count(); i < count; i++ )
32 {
33 ActionBase action = ActionManagerBase.GetActionVariant( m_type );
34 action.SetVariantID(i);
35 m_VariantActions.Insert(action);
36 }
37
38 }
39
40 int GetActions( out array<ref ActionBase> variants_action)
41 {
42 variants_action = m_VariantActions;
43 return m_VariantActions.Count();
44 }
45
47 {
48 return m_VariantActions.Count();
49 }
50
51 void UpdateVariants( Object item, Object target, int componet_index )
52 {
53 e_OnUpdate.Invoke( item, target, componet_index );
54 }
55}
void ActionBase()
Definition ActionBase.c:73
void ActionManagerBase(PlayerBase player)
void SetActionVariantCount(int count)
ScriptInvoker GetOnUpdateInvoker()
protected ref ScriptInvoker e_OnUpdate
int GetActions(out array< ref ActionBase > variants_action)
void UpdateVariants(Object item, Object target, int componet_index)
void ActionVariantManager(typename type)
protected ref array< ref ActionBase > m_VariantActions
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
Result for an object found in CGame.IsBoxCollidingGeometryProxy.