DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ComponentEntityDebug.c
См. документацию.
1class ComponentEntityDebug extends Component
2{
3
6 protected float m_DebugShapeDirectionDist;
7
8 // -------------------------------------------------------------------------
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
23 m_DebugShapeBBox = Debug.DrawBox(min_max[0], min_max[1]);
24
26
27 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
28
29 return null;
30 }
31
32 // -------------------------------------------------------------------------
33 override void DebugBBoxSetColor(int color)
34 {
35 if ( m_DebugShapeBBox )
36 {
37 m_DebugShapeBBox.SetColor(color);
38 }
39 }
40
41 // -------------------------------------------------------------------------
42 override void DebugBBoxDelete()
43 {
44 #ifndef DEVELOPER
45 return;
46 #endif
47
48 if ( m_DebugShapeBBox )
49 {
50 m_DebugShapeBBox.Destroy();
51 m_DebugShapeBBox = null;
52 }
53
55 {
57 }
58 }
59
60 // -------------------------------------------------------------------------
61 override Shape DebugDirectionDraw(float distance = 1)
62 {
63 #ifndef DEVELOPER
64 return null;
65 #endif
66
68 {
69 m_DebugShapeDirection.Destroy();
70 }
71
72 vector p1 = "0 0 0";
76
78
79 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
80 return null;
81 }
82
83 // -------------------------------------------------------------------------
84 override void DebugDirectionDelete()
85 {
86 #ifndef DEVELOPER
87 return;
88 #endif
89
91 {
92 m_DebugShapeDirection.Destroy();
94 }
95
97 {
99 }
100 }
101
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 }
124}
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
Shape m_DebugShapeBBox
Определения ComponentEntityDebug.c:4
EntityAI m_ThisEntityAI
Определения Component.c:24
override void DebugBBoxDelete()
Определения ComponentEntityDebug.c:42
void OnDrawing()
Определения ComponentEntityDebug.c:102
override void DebugDirectionDelete()
Определения ComponentEntityDebug.c:84
override Shape DebugDirectionDraw(float distance=1)
Определения ComponentEntityDebug.c:61
Shape m_DebugShapeDirection
Определения ComponentEntityDebug.c:5
override Shape DebugBBoxDraw()
Определения ComponentEntityDebug.c:9
override void DebugBBoxSetColor(int color)
Определения ComponentEntityDebug.c:33
float m_DebugShapeDirectionDist
Определения ComponentEntityDebug.c:6
Определения Component.c:16
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Определения Debug.c:286
static Shape DrawArrow(vector from, vector to, float size=0.5, int color=0xFFFFFFFF, int flags=0)
Определения Debug.c:404
Определения Debug.c:2
proto void Remove(func fn)
remove specific call from queue
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Определения EnConvert.c:106
proto native CGame GetGame()
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
EntityEvent
Entity events for event-mask, or throwing event from code.
Определения EnEntity.c:45
const int CALL_CATEGORY_GUI
Определения tools.c:9