Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
MotorExhaustSystem.c
Go to the documentation of this file.
1
class
MotorExhaustSystem
:
GameSystem
2
{
3
//------------------------------------------------------------------------------------------------
4
override
static
void
InitInfo(
WorldSystemInfo
outInfo)
5
{
6
outInfo
7
.SetAbstract(
false
)
8
.AddPoint(
ESystemPoint
.Frame);
9
}
10
//------------------------------------------------------------------------------------------------
11
protected
ref array<SCR_MotorExhaustEffectGeneralComponent>
m_MotorsComponents
= {};
12
//------------------------------------------------------------------------------------------------
13
override
bool
ShouldBePaused
() {
return
true
; };
14
//------------------------------------------------------------------------------------------------
15
override
protected
void
OnUpdatePoint
(
WorldUpdatePointArgs
args)
16
{
17
float
timeSlice = args.GetTimeSliceSeconds();
18
19
foreach
(SCR_MotorExhaustEffectGeneralComponent comp:
m_MotorsComponents
)
20
{
21
comp.Update(timeSlice);
22
}
23
}
24
//------------------------------------------------------------------------------------------------
25
override
void
OnStopped
()
26
{
27
foreach
(SCR_MotorExhaustEffectGeneralComponent comp:
m_MotorsComponents
)
28
{
29
comp.OnGamePauseChanged(
true
);
30
}
31
}
32
//------------------------------------------------------------------------------------------------
33
override
void
OnStarted
()
34
{
35
foreach
(SCR_MotorExhaustEffectGeneralComponent comp:
m_MotorsComponents
)
36
{
37
comp.OnGamePauseChanged(
false
);
38
}
39
}
40
//------------------------------------------------------------------------------------------------
41
override
void
OnDiag
(
float
timeSlice)
42
{
43
DbgUI
.Begin(
"MotorExhaustSystem"
);
44
45
DbgUI
.Text(
"Motors: "
+
m_MotorsComponents
.Count());
46
47
if
(
DbgUI
.Button(
"Dump active motors components"
))
48
{
49
foreach
(SCR_MotorExhaustEffectGeneralComponent comp:
m_MotorsComponents
)
50
{
51
Print
(comp.GetOwner(),
LogLevel
.ERROR);
52
}
53
}
54
55
DbgUI
.End();
56
}
57
//------------------------------------------------------------------------------------------------
58
void
Register
(SCR_MotorExhaustEffectGeneralComponent component)
59
{
60
//About to be deleted
61
if
(component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() &
EntityFlags
.USER5))
62
return
;
63
64
if
(
m_MotorsComponents
.Find(component) != -1)
65
return
;
66
67
m_MotorsComponents
.Insert(component);
68
}
69
//------------------------------------------------------------------------------------------------
70
void
Unregister
(SCR_MotorExhaustEffectGeneralComponent component)
71
{
72
int
idx
=
m_MotorsComponents
.Find(component);
73
if
(
idx
== -1)
74
return
;
75
76
m_MotorsComponents
.Remove(
idx
);
77
}
78
}
idx
int idx
Definition
AIControlComponentSerializer.c:13
DbgUI
Definition
DbgUI.c:66
GameSystem
Definition
GameSystem.c:16
MotorExhaustSystem
Definition
MotorExhaustSystem.c:2
MotorExhaustSystem::OnStarted
override void OnStarted()
Definition
MotorExhaustSystem.c:33
MotorExhaustSystem::m_MotorsComponents
ref array< SCR_MotorExhaustEffectGeneralComponent > m_MotorsComponents
Definition
MotorExhaustSystem.c:11
MotorExhaustSystem::OnUpdatePoint
void OnUpdatePoint(WorldUpdatePointArgs args)
Definition
MotorExhaustSystem.c:15
MotorExhaustSystem::Register
void Register(SCR_MotorExhaustEffectGeneralComponent component)
Definition
MotorExhaustSystem.c:58
MotorExhaustSystem::ShouldBePaused
override bool ShouldBePaused()
Definition
MotorExhaustSystem.c:13
MotorExhaustSystem::OnStopped
override void OnStopped()
Definition
MotorExhaustSystem.c:25
MotorExhaustSystem::OnDiag
override void OnDiag(float timeSlice)
Definition
MotorExhaustSystem.c:41
MotorExhaustSystem::Unregister
void Unregister(SCR_MotorExhaustEffectGeneralComponent component)
Definition
MotorExhaustSystem.c:70
WorldSystemInfo
Structure holding world system meta-information required by the engine.
Definition
WorldSystemInfo.c:14
WorldUpdatePointArgs
Structure holding extra data of WorldSystem update point.
Definition
WorldUpdatePointArgs.c:14
ESystemPoint
WorldSystemPoint ESystemPoint
Definition
gameLib.c:7
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
EntityFlags
EntityFlags
Various entity flags.
Definition
EntityFlags.c:14
scripts
Game
Systems
MotorExhaustSystem.c
Generated by
1.17.0