Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ComponentsBank

Закрытые члены

void ComponentsBank (EntityAI entity_parent)
 
Component GetComponent (int comp_type, string extended_class_name="")
 
bool DeleteComponent (int comp_type)
 
Component CreateComponent (int comp_type, string extended_class_name="")
 
bool IsComponentAlreadyExist (int comp_type)
 

Закрытые данные

EntityAI m_EntityParent
 
ref Component m_Components [COMP_TYPE_COUNT]
 

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

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

◆ ComponentsBank()

void ComponentsBank ( EntityAI entity_parent)
inlineprivate
7 {
9 }
EntityAI m_EntityParent
Definition ComponentsBank.c:3
Definition EntityAI.c:95

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

Методы

◆ CreateComponent()

Component CreateComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate
39 {
41 {
42 Component.LogErrorBadCompType(comp_type, "EntityAI->CreateComponent(int comp_type)");
43 return NULL;
44 }
45
47 {
48 Component.LogWarningAlredyExist(comp_type, "EntityAI->CreateComponent(int comp_type)");
49 return m_Components[comp_type];
50 }
51
52
54
55 if ( clas_name == string.Empty )
56 {
58 }
59
60 Component comp = Component.Cast(clas_name.ToType().Spawn());
61
62 comp.SetParentEntityAI(m_EntityParent);
63 comp.Event_OnAwake();
64
66
67 comp.Event_OnInit();
68
69 return comp;
70 }
Empty
Definition Hand_States.c:14
Definition Component.c:16
static string GetNameByType(int comp_type)
Definition Component.c:48
static void LogWarningAlredyExist(int comp_type, string fnc_name)
Definition Component.c:85
static void LogErrorBadCompType(int comp_type, string fnc_name)
Definition Component.c:76
static bool IsTypeExist(int comp_type)
Definition Component.c:62
bool IsComponentAlreadyExist(int comp_type)
Definition ComponentsBank.c:72
ref Component m_Components[COMP_TYPE_COUNT]
Definition ComponentsBank.c:4

Перекрестные ссылки Empty, Component::GetNameByType(), IsComponentAlreadyExist(), Component::IsTypeExist(), Component::LogErrorBadCompType(), Component::LogWarningAlredyExist(), m_Components и m_EntityParent.

Используется в GetComponent().

◆ DeleteComponent()

bool DeleteComponent ( int comp_type)
inlineprivate
28 {
30 {
32 return true;
33 }
34
35 return false;
36 }

Перекрестные ссылки IsComponentAlreadyExist() и m_Components.

◆ GetComponent()

Component GetComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate
12 {
14 {
15 Component.LogErrorBadCompType(comp_type, "EntityAI.GetComponent(int comp_type)");
16 return NULL;
17 }
18
20 {
22 }
23
24 return m_Components[comp_type];
25 }
Component CreateComponent(int comp_type, string extended_class_name="")
Definition ComponentsBank.c:38

Перекрестные ссылки CreateComponent(), IsComponentAlreadyExist(), Component::IsTypeExist(), Component::LogErrorBadCompType() и m_Components.

◆ IsComponentAlreadyExist()

bool IsComponentAlreadyExist ( int comp_type)
inlineprivate
73 {
74 if ( m_Components[comp_type] != NULL )
75 {
76 return true;
77 }
78
79 return false;
80 }

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

Используется в CreateComponent(), DeleteComponent() и GetComponent().

Поля

◆ m_Components

◆ m_EntityParent

EntityAI m_EntityParent
private

Используется в ComponentsBank() и CreateComponent().


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