DayZ 1.24
Loading...
Searching...
No Matches
CAInteractLoop Class Reference
Inheritance diagram for CAInteractLoop:
[legend]
Collaboration diagram for CAInteractLoop:
[legend]

Protected Member Functions

void CAInteractLoop (float time_to_complete_action)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 

Protected Attributes

float m_LocalTimeElpased
 
float m_TimeElpased
 
float m_TimeToComplete
 
float m_DefaultTimeToComplete
 
ref Param1< floatm_SpentUnits
 

Additional Inherited Members

- Private Member Functions inherited from CABase
void Init (ActionData action_data)
 
void Setup (ActionData action_data)
 
int Execute (ActionData action_data)
 
int Cancel (ActionData action_data)
 
int Interrupt (ActionData action_data)
 
void SetACData (Param units)
 
Param GetACData ()
 
bool IsContinuousAction ()
 
float GetProgress ()
 
- Private Attributes inherited from CABase
ActionBase m_Action
 
float m_LastTick
 
ref Param m_ACData
 
ref Param2< float, floatm_ProgressParam
 

Detailed Description

Definition at line 1 of file CAInteractLoop.c.

Constructor & Destructor Documentation

◆ CAInteractLoop()

void CAInteractLoop::CAInteractLoop ( float time_to_complete_action)
inlineprotected

Definition at line 9 of file CAInteractLoop.c.

References m_DefaultTimeToComplete.

Member Function Documentation

◆ Execute()

override int CAInteractLoop::Execute ( ActionData action_data)
inlineprotected

Definition at line 25 of file CAInteractLoop.c.

26 {
27 if (!action_data.m_Player)
28 return UA_ERROR;
29
31 {
32 m_TimeElpased += action_data.m_Player.GetDeltaT();
33 return UA_PROCESSING;
34 }
35 else
36 {
37 if (m_SpentUnits)
38 {
41 }
42 return UA_FINISHED;
43 }
44 }
void SetACData(Param units)
Definition CABase.c:38
ref Param1< float > m_SpentUnits
const int UA_FINISHED
Definition constants.c:436
const int UA_ERROR
Definition constants.c:455
const int UA_PROCESSING
Definition constants.c:434

References m_SpentUnits, m_TimeElpased, m_TimeToComplete, CABase::SetACData(), UA_ERROR, UA_FINISHED, and UA_PROCESSING.

◆ Setup()

override void CAInteractLoop::Setup ( ActionData action_data)
inlineprotected

Definition at line 14 of file CAInteractLoop.c.

15 {
16 m_TimeElpased = 0;
17 if (!m_SpentUnits)
19 else
20 m_SpentUnits.param1 = 0;
21
22 m_TimeToComplete = action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus(m_DefaultTimeToComplete, m_Action.GetSpecialtyWeight(), true);
23 }
ActionBase m_Action
Definition CABase.c:3

References CABase::m_Action, m_DefaultTimeToComplete, m_SpentUnits, m_TimeElpased, and m_TimeToComplete.

Member Data Documentation

◆ m_DefaultTimeToComplete

float CAInteractLoop::m_DefaultTimeToComplete
protected

Definition at line 6 of file CAInteractLoop.c.

Referenced by CAInteractLoop(), and Setup().

◆ m_LocalTimeElpased

float CAInteractLoop::m_LocalTimeElpased
protected

Definition at line 3 of file CAInteractLoop.c.

◆ m_SpentUnits

ref Param1<float> CAInteractLoop::m_SpentUnits
protected

Definition at line 7 of file CAInteractLoop.c.

Referenced by Execute(), and Setup().

◆ m_TimeElpased

float CAInteractLoop::m_TimeElpased
protected

Definition at line 4 of file CAInteractLoop.c.

Referenced by Execute(), and Setup().

◆ m_TimeToComplete

float CAInteractLoop::m_TimeToComplete
protected

Definition at line 5 of file CAInteractLoop.c.

Referenced by Execute(), and Setup().


The documentation for this class was generated from the following file: