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

Protected Member Functions

void CAContinuousRepeat (float time_to_complete_action)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void SetProgress (float value)
 

Protected Attributes

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

Detailed Description

Definition at line 1 of file CAContinuousRepeat.c.

Constructor & Destructor Documentation

◆ CAContinuousRepeat()

void CAContinuousRepeat::CAContinuousRepeat ( float time_to_complete_action)
inlineprotected

Member Function Documentation

◆ Cancel()

override int CAContinuousRepeat::Cancel ( ActionData action_data)
inlineprotected

Definition at line 45 of file CAContinuousRepeat.c.

46 {
47 if (m_SpentUnits)
48 {
51 }
52 return UA_CANCEL;
53 }
void SetACData(Param units)
Definition CABase.c:38
ref Param1< float > m_SpentUnits
const int UA_CANCEL
Definition constants.c:437

References m_SpentUnits, m_TotalTimeElpased, CABase::SetACData(), and UA_CANCEL.

◆ Execute()

override int CAContinuousRepeat::Execute ( ActionData action_data)
inlineprotected

Definition at line 24 of file CAContinuousRepeat.c.

25 {
26 if (!action_data.m_Player)
27 return UA_ERROR;
28
30 {
31 m_TimeElpased += action_data.m_Player.GetDeltaT();
32 m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
33 return UA_PROCESSING;
34 }
35 else
36 {
41 return UA_PROCESSING;
42 }
43 }
void OnCompletePogress(ActionData action_data)
const int UA_ERROR
Definition constants.c:455
const int UA_PROCESSING
Definition constants.c:434

References m_SpentUnits, m_TimeElpased, m_TimeToComplete, m_TotalTimeElpased, CAContinuousBase::OnCompletePogress(), CABase::SetACData(), UA_ERROR, and UA_PROCESSING.

◆ GetProgress()

override float CAContinuousRepeat::GetProgress ( )
inlineprotected

Definition at line 55 of file CAContinuousRepeat.c.

56 {
58 //Print("progress: " + progress + " | m_TimeElpased: " + m_TimeElpased + " | m_TimeToComplete: " + m_TimeToComplete);
59 return progress;
60 }

References m_TimeElpased, and m_TimeToComplete.

◆ SetProgress()

void CAContinuousRepeat::SetProgress ( float value)
inlineprotected

◆ Setup()

override void CAContinuousRepeat::Setup ( ActionData action_data)
inlineprotected

Definition at line 14 of file CAContinuousRepeat.c.

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

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

Member Data Documentation

◆ m_DefaultTimeToComplete

◆ m_SpentUnits

◆ m_TimeElpased

◆ m_TimeToComplete

◆ m_TotalTimeElpased

float CAContinuousRepeat::m_TotalTimeElpased
protected

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