DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CAContinuousTime
+ Граф наследования:CAContinuousTime:

Защищенные члены

void CAContinuousTime (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 ()
 

Защищенные данные

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

Подробное описание

Конструктор(ы)

◆ CAContinuousTime()

void CAContinuousTime ( float time_to_complete_action)
inlineprotected
10 {
12 }
float m_DefaultTimeToComplete
Definition CAContinuousTime.c:6
Definition EntityAI.c:95

Перекрестные ссылки m_DefaultTimeToComplete.

Методы

◆ Cancel()

override int Cancel ( ActionData action_data)
inlineprotected
59 {
60 if ( m_SpentUnits )
61 {
64 }
65 if ( m_DefaultTimeToComplete < 0 ) //for infinite actions
66 {
67 return UA_FINISHED;
68 }
69
70 return UA_CANCEL;
71 }
void SetACData(Param units)
Definition CABase.c:40
ref Param1< float > m_SpentUnits
Definition CAContinuousTime.c:7
float m_TimeElpased
Definition CAContinuousTime.c:4
const int UA_FINISHED
Definition constants.c:443
const int UA_CANCEL
Definition constants.c:444

Перекрестные ссылки m_DefaultTimeToComplete, m_SpentUnits, m_TimeElpased, CABase::SetACData(), UA_CANCEL и UA_FINISHED.

◆ Execute()

override int Execute ( ActionData action_data)
inlineprotected
30 {
31 if ( m_DefaultTimeToComplete < 0 ) //for infinite actions
32 {
33 return UA_PROCESSING;
34 }
35
36 if ( !action_data.m_Player )
37 {
38 return UA_ERROR;
39 }
40
42 {
43 m_TimeElpased += action_data.m_Player.GetDeltaT();
44 return UA_PROCESSING;
45 }
46 else
47 {
48 if ( m_SpentUnits )
49 {
52 }
54 return UA_FINISHED;
55 }
56 }
void OnCompletePogress(ActionData action_data)
Definition CAContinuousBase.c:8
float m_AdjustedTimeToComplete
Definition CAContinuousTime.c:5
const int UA_ERROR
Definition constants.c:462
const int UA_PROCESSING
Definition constants.c:441

Перекрестные ссылки m_AdjustedTimeToComplete, m_DefaultTimeToComplete, m_SpentUnits, m_TimeElpased, CAContinuousBase::OnCompletePogress(), CABase::SetACData(), UA_ERROR, UA_FINISHED и UA_PROCESSING.

◆ GetProgress()

override float GetProgress ( )
inlineprotected
74 {
75 if ( m_AdjustedTimeToComplete != 0 )
76 {
77 //progress = m_TimeElpased/m_AdjustedTimeToComplete;
79 }
80 else
81 {
82 Print("USER ACTION COMPONENT CONTINUOUS TIME - WRONG TIME TO COMPLETE CALCULATION - Incorrect data for progress bar!");
83 }
84 return 1;
85 }
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки m_AdjustedTimeToComplete, m_TimeElpased и Print().

◆ Setup()

override void Setup ( ActionData action_data)
inlineprotected
15 {
16 m_TimeElpased = 0;
17 if ( !m_SpentUnits )
18 {
20 }
21 else
22 {
23 m_SpentUnits.param1 = 0;
24 }
25
27 }

Перекрестные ссылки m_AdjustedTimeToComplete, m_DefaultTimeToComplete, m_SpentUnits и m_TimeElpased.

Поля

◆ m_AdjustedTimeToComplete

◆ m_DefaultTimeToComplete

float m_DefaultTimeToComplete
protected

Используется в CAContinuousTime(), Cancel(), Execute() и Setup().

◆ m_LocalTimeElpased

float m_LocalTimeElpased
protected

◆ m_SpentUnits

ref Param1<float> m_SpentUnits
protected

◆ m_TimeElpased


Объявления и описания членов класса находятся в файле: