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

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

void Event_OnFrame (IEntity other, float timeSlice)
 
Shape DebugBBoxDraw ()
 
void DebugBBoxSetColor (int color)
 
void DebugBBoxDelete ()
 
Shape DebugDirectionDraw (float distance=1)
 
void DebugDirectionSetColor (int color)
 
void DebugDirectionDelete ()
 
void SetParentEntityAI (EntityAI e)
 
void Event_OnAwake ()
 
void Event_OnInit ()
 
void LogThis (string msg, string fnc_name="n/a")
 
void LogThisWarning (string msg, string fnc_name="n/a")
 
void LogThisError (string msg, string fnc_name="n/a")
 
string GetCompName ()
 
int GetCompType ()
 
void Event_OnItemAttached (EntityAI item, string slot_name)
 
void Event_OnItemDetached (EntityAI item, string slot_name)
 
override Shape DebugBBoxDraw ()
 
override void DebugBBoxSetColor (int color)
 
override void DebugBBoxDelete ()
 
override Shape DebugDirectionDraw (float distance=1)
 
override void DebugDirectionDelete ()
 
void OnDrawing ()
 

Защищенные статические члены

static void Init ()
 
static string GetNameByType (int comp_type)
 
static bool IsTypeExist (int comp_type)
 
static void LogErrorBadCompType (int comp_type, string fnc_name)
 
static void LogWarningAlredyExist (int comp_type, string fnc_name)
 

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

EntityAI m_ThisEntityAI
 
Shape m_DebugShapeBBox
 
Shape m_DebugShapeDirection
 
float m_DebugShapeDirectionDist
 

Закрытые статические данные

static string m_CompNames [COMP_TYPE_COUNT]
 

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

Методы

◆ DebugBBoxDelete() [1/2]

void DebugBBoxDelete ( )
protected

◆ DebugBBoxDelete() [2/2]

override void DebugBBoxDelete ( )
inlineprotected
43 {
44 #ifndef DEVELOPER
45 return;
46 #endif
47
48 if ( m_DebugShapeBBox )
49 {
50 m_DebugShapeBBox.Destroy();
52 }
53
55 {
56 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Remove(OnDrawing);
57 }
58 }
Shape m_DebugShapeBBox
Definition ComponentEntityDebug.c:4
Shape m_DebugShapeDirection
Definition ComponentEntityDebug.c:5
void OnDrawing()
Definition ComponentEntityDebug.c:102
Definition EntityAI.c:95
proto native CGame GetGame()
const int CALL_CATEGORY_GUI
Definition tools.c:9

Перекрестные ссылки CALL_CATEGORY_GUI и GetGame().

◆ DebugBBoxDraw() [1/2]

Shape DebugBBoxDraw ( )
protected

◆ DebugBBoxDraw() [2/2]

override Shape DebugBBoxDraw ( )
inlineprotected
10 {
11 #ifndef DEVELOPER
12 return null;
13 #endif
14
15 if ( m_DebugShapeBBox )
16 m_DebugShapeBBox.Destroy();
17
18 vector min_max[2];
19
20 if (!m_ThisEntityAI.GetCollisionBox(min_max))
21 return null;
22
24
25 GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(OnDrawing, 0, true);
26
27 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
28
29 return null;
30 }
EntityAI m_ThisEntityAI
Definition Component.c:24
Definition Debug.c:14
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Definition Debug.c:300
Definition EnConvert.c:106
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45

Перекрестные ссылки CALL_CATEGORY_GUI, Debug::DrawBox() и GetGame().

◆ DebugBBoxSetColor() [1/2]

void DebugBBoxSetColor ( int color)
protected

◆ DebugBBoxSetColor() [2/2]

override void DebugBBoxSetColor ( int color)
inlineprotected
34 {
35 if ( m_DebugShapeBBox )
36 {
37 m_DebugShapeBBox.SetColor(color);
38 }
39 }

◆ DebugDirectionDelete() [1/2]

void DebugDirectionDelete ( )
protected

◆ DebugDirectionDelete() [2/2]

override void DebugDirectionDelete ( )
inlineprotected
85 {
86 #ifndef DEVELOPER
87 return;
88 #endif
89
91 {
92 m_DebugShapeDirection.Destroy();
94 }
95
97 {
98 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Remove(OnDrawing);
99 }
100 }

Перекрестные ссылки CALL_CATEGORY_GUI и GetGame().

◆ DebugDirectionDraw() [1/2]

Shape DebugDirectionDraw ( float distance = 1)
protected

◆ DebugDirectionDraw() [2/2]

override Shape DebugDirectionDraw ( float distance = 1)
inlineprotected
62 {
63 #ifndef DEVELOPER
64 return null;
65 #endif
66
68 {
69 m_DebugShapeDirection.Destroy();
70 }
71
72 vector p1 = "0 0 0";
76
77 GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(OnDrawing, 0, true);
78
79 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
80 return null;
81 }
float m_DebugShapeDirectionDist
Definition ComponentEntityDebug.c:6
static Shape DrawArrow(vector from, vector to, float size=0.5, int color=0xFFFFFFFF, int flags=0)
Definition Debug.c:410

Перекрестные ссылки CALL_CATEGORY_GUI, Debug::DrawArrow() и GetGame().

◆ DebugDirectionSetColor()

void DebugDirectionSetColor ( int color)
protected

◆ Event_OnAwake()

void Event_OnAwake ( )
inlineprotected
103 {
104
105 }

◆ Event_OnFrame()

void Event_OnFrame ( IEntity other,
float timeSlice )
protected

◆ Event_OnInit()

void Event_OnInit ( )
inlineprotected
111 {
112
113 }

◆ Event_OnItemAttached()

void Event_OnItemAttached ( EntityAI item,
string slot_name )
inlineprotected
159 {
160 LogThis("" + item + " -> " + slot_name,"Event_OnItemAttached");
161 //Debug.Log("Component=>Event_OnItemAttached: " + item + " -> " + slot_name, );
162 }
void LogThis(string msg, string fnc_name="n/a")
Definition Component.c:118

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

◆ Event_OnItemDetached()

void Event_OnItemDetached ( EntityAI item,
string slot_name )
inlineprotected
168 {
169 LogThis("" + item + " <- " + slot_name,"Event_OnItemDetached");
170 //Log("Component=>Event_OnItemDetached: " + item + " <- " + slot_name );
171 }

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

◆ GetCompName()

string GetCompName ( )
inlineprotected
143 {
144 return Component.GetNameByType(this.GetCompType());
145 }
Definition Component.c:16
static string GetNameByType(int comp_type)
Definition Component.c:48
int GetCompType()
Definition Component.c:150

Перекрестные ссылки GetCompType() и GetNameByType().

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

◆ GetCompType()

int GetCompType ( )
inlineprotected
151 {
152 return COMP_TYPE_UNDEFINED;
153 }
const int COMP_TYPE_UNDEFINED
Definition Component.c:7

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

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

◆ GetNameByType()

static string GetNameByType ( int comp_type)
inlinestaticprotected
49 {
50 if ( IsTypeExist(comp_type) == false )
51 {
52 LogErrorBadCompType(comp_type, "Component->GetNameByType()");
53 return "None";
54 }
55
56 return m_CompNames[comp_type];
57 }
static string m_CompNames[COMP_TYPE_COUNT]
Definition Component.c:20
static void LogErrorBadCompType(int comp_type, string fnc_name)
Definition Component.c:76
static bool IsTypeExist(int comp_type)
Definition Component.c:62

Перекрестные ссылки IsTypeExist(), LogErrorBadCompType() и m_CompNames.

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

◆ Init()

static void Init ( )
inlinestaticprotected
38 {
39 m_CompNames[COMP_TYPE_ETITY_DEBUG] = "ComponentEntityDebug";
40 m_CompNames[COMP_TYPE_ENERGY_MANAGER] = "ComponentEnergyManager";
41 m_CompNames[COMP_TYPE_BODY_STAGING] = "ComponentBodyStaging";
42 m_CompNames[COMP_TYPE_ANIMAL_BLEEDING] = "ComponentAnimalBleeding";
43 }
const int COMP_TYPE_ANIMAL_BLEEDING
Definition Component.c:11
const int COMP_TYPE_BODY_STAGING
Definition Component.c:10
const int COMP_TYPE_ENERGY_MANAGER
Definition Component.c:9
const int COMP_TYPE_ETITY_DEBUG
Definition Component.c:8

Перекрестные ссылки COMP_TYPE_ANIMAL_BLEEDING, COMP_TYPE_BODY_STAGING, COMP_TYPE_ENERGY_MANAGER, COMP_TYPE_ETITY_DEBUG и m_CompNames.

Используется в CGame::DayZGame().

◆ IsTypeExist()

static bool IsTypeExist ( int comp_type)
inlinestaticprotected
63 {
65 {
66 return false;
67 }
68
69 return true;
70 }
const int COMP_TYPE_COUNT
Definition Component.c:12

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

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

◆ LogErrorBadCompType()

static void LogErrorBadCompType ( int comp_type,
string fnc_name )
inlinestaticprotected
77 {
78 string msg = "Bad parameter comp_type='"+comp_type.ToString()+"'. Parameter must be 0-"+(COMP_TYPE_COUNT - 1).ToString()+". Returning component name 'None'.";
79 Debug.LogError(msg, "Component", "n/a", fnc_name);
80 }
proto string ToString()
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:259

Перекрестные ссылки COMP_TYPE_COUNT, Debug::LogError() и ToString().

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

◆ LogThis()

void LogThis ( string msg,
string fnc_name = "n/a" )
inlineprotected
119 {
120 //Debug.Log(msg, GetCompName(), "n/a", fnc_name, m_ThisEntityAI.ToString());
121 }

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

◆ LogThisError()

void LogThisError ( string msg,
string fnc_name = "n/a" )
inlineprotected
135 {
136 Debug.LogError(msg, GetCompName(), "n/a", fnc_name, m_ThisEntityAI.ToString());
137 }
string GetCompName()
Definition Component.c:142

Перекрестные ссылки GetCompName(), Debug::LogError() и m_ThisEntityAI.

◆ LogThisWarning()

void LogThisWarning ( string msg,
string fnc_name = "n/a" )
inlineprotected
127 {
128 Debug.LogWarning(msg, GetCompName(), "n/a", fnc_name, m_ThisEntityAI.ToString());
129 }
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
Definition Debug.c:244

Перекрестные ссылки GetCompName(), Debug::LogWarning() и m_ThisEntityAI.

◆ LogWarningAlredyExist()

static void LogWarningAlredyExist ( int comp_type,
string fnc_name )
inlinestaticprotected
86 {
87 string msg = "Component '"+Component.GetNameByType(comp_type)+"' already exists!";
88 Debug.LogError(msg, "Component", "n/a", fnc_name);
89 }

Перекрестные ссылки GetNameByType() и Debug::LogError().

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

◆ OnDrawing()

void OnDrawing ( )
inlineprotected
103 {
104 #ifndef DEVELOPER
105 return;
106 #endif
107
109 {
110 vector mat[4];
111 m_ThisEntityAI.GetTransform(mat);
112
113 if ( m_DebugShapeBBox )
114 {
115 m_DebugShapeBBox.SetMatrix(mat);
116 }
117
119 {
120 m_DebugShapeDirection.SetMatrix(mat);
121 }
122 }
123 }

◆ SetParentEntityAI()

void SetParentEntityAI ( EntityAI e)
inlineprotected
95 {
97 }

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

Поля

◆ m_CompNames

string m_CompNames[COMP_TYPE_COUNT]
staticprivate

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

◆ m_DebugShapeBBox

Shape m_DebugShapeBBox
protected

◆ m_DebugShapeDirection

Shape m_DebugShapeDirection
protected

◆ m_DebugShapeDirectionDist

float m_DebugShapeDirectionDist
protected

◆ m_ThisEntityAI

EntityAI m_ThisEntityAI
protected

Используется в ComponentAnimalBleeding::Bleed(), ComponentEnergyManager::CanBePluggedInto(), ComponentEnergyManager::CanReceivePlugFrom(), ComponentEnergyManager::CanWork(), ComponentEnergyManager::CheckWetness(), ComponentEnergyManager::ConsumeEnergy(), ComponentEnergyManager::DebugUpdate(), ComponentEnergyManager::DeviceUpdate(), ComponentEnergyManager::Event_OnAwake(), ComponentEnergyManager::Event_OnInit(), ComponentEnergyManager::FindAndConsumeEnergy(), ComponentEnergyManager::GetEnergyMax(), ComponentEnergyManager::GetThisEntityAI(), ComponentAnimalBleeding::InflictWoundDamage(), LogThisError(), LogThisWarning(), ComponentEnergyManager::OnAttachmentAdded(), ComponentEnergyManager::OnDeviceDestroyed(), ComponentEnergyManager::OnEnergyAdded(), ComponentEnergyManager::OnEnergyConsumed(), ComponentEnergyManager::OnInteractBranch(), ComponentEnergyManager::OnIsPlugged(), ComponentEnergyManager::OnIsUnplugged(), ComponentEnergyManager::OnOwnSocketReleased(), ComponentEnergyManager::OnOwnSocketTaken(), ComponentEnergyManager::OnWork(), ComponentEnergyManager::PlugInDevice(), ComponentEnergyManager::PlugThisInto(), ComponentEnergyManager::ResetEnergyUsage(), ComponentEnergyManager::SetEnergy(), SetParentEntityAI(), ComponentEnergyManager::SwitchOff(), ComponentEnergyManager::SwitchOn(), ComponentEnergyManager::Synch(), ComponentBodyStaging::SynchSkinnedState(), ComponentEnergyManager::UnplugCordFromSocket(), ComponentEnergyManager::UnplugDevice(), ComponentEnergyManager::UnplugThis(), ComponentEnergyManager::UpdateCanWork(), ComponentEnergyManager::UpdatePlugState(), ComponentEnergyManager::UpdateSelections() и ComponentEnergyManager::UpdateSocketSelections().


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