Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_VInfoAutoHover.c
Go to the documentation of this file.
1
class
SCR_VInfoAutoHover
:
SCR_BaseVehicleInfo
2
{
3
protected
SCR_HelicopterControllerComponent
m_HelicoperController
;
4
protected
SignalsManagerComponent
m_SignalsManager
;
5
6
protected
int
m_iSignalIndexSpeed
;
7
protected
const
string
SIGNAL_SPEED
=
"airspeed"
;
8
9
protected
int
m_iSignalIndexAlt
;
10
protected
const
string
SIGNAL_ALTITUDE
=
"altitudeAGL"
;
11
12
//------------------------------------------------------------------------------------------------
14
override
EVehicleInfoState
GetState
()
15
{
16
if
(!
m_HelicoperController
|| !
m_SignalsManager
)
17
return
EVehicleInfoState
.DISABLED;
18
19
m_bIsBlinking
=
false
;
20
21
float
speed =
m_SignalsManager
.GetSignalValue(
m_iSignalIndexSpeed
);
22
float
alt =
m_SignalsManager
.GetSignalValue(
m_iSignalIndexAlt
);
23
24
bool
bIsAutoHoverOn =
m_HelicoperController
.GetAutohoverEnabled();
25
26
if
(!bIsAutoHoverOn)
27
return
EVehicleInfoState
.DISABLED;
28
29
EVehicleInfoState
state;
30
31
if
(speed > 20 && alt > 1)
32
{
33
state =
EVehicleInfoState
.WARNING;
34
}
35
else
36
{
37
state =
EVehicleInfoState
.ENABLED;
38
}
39
40
return
state;
41
}
42
43
//------------------------------------------------------------------------------------------------
45
override
void
DisplayInit
(
IEntity
owner)
46
{
47
super.DisplayInit(owner);
48
49
m_HelicoperController
= SCR_HelicopterControllerComponent.Cast(owner.
FindComponent
(SCR_HelicopterControllerComponent));
50
51
if
(!
m_HelicoperController
)
52
return
;
53
54
m_SignalsManager
=
m_HelicoperController
.GetSignalsManager();
55
56
if
(!
m_SignalsManager
)
57
return
;
58
59
m_iSignalIndexSpeed
=
m_SignalsManager
.FindSignal(
SIGNAL_SPEED
);
60
m_iSignalIndexAlt
=
m_SignalsManager
.FindSignal(
SIGNAL_ALTITUDE
);
61
}
62
};
EVehicleInfoState
EVehicleInfoState
UI indicator state, controlling colors and opacity.
Definition
SCR_BaseVehicleInfo.c:6
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_BaseVehicleInfo
Base class for all vehicle UI state and damage indicators.
Definition
SCR_BaseVehicleInfo.c:29
SCR_BaseVehicleInfo::m_bIsBlinking
bool m_bIsBlinking
Definition
SCR_BaseVehicleInfo.c:50
SCR_VInfoAutoHover
Definition
SCR_VInfoAutoHover.c:2
SCR_VInfoAutoHover::GetState
override EVehicleInfoState GetState()
Can be overridden to get state of actual system or linked to an event.
Definition
SCR_VInfoAutoHover.c:14
SCR_VInfoAutoHover::SIGNAL_SPEED
const string SIGNAL_SPEED
Definition
SCR_VInfoAutoHover.c:7
SCR_VInfoAutoHover::DisplayInit
override void DisplayInit(IEntity owner)
Init the UI, runs 1x at the start of the game.
Definition
SCR_VInfoAutoHover.c:45
SCR_VInfoAutoHover::m_iSignalIndexSpeed
int m_iSignalIndexSpeed
Definition
SCR_VInfoAutoHover.c:6
SCR_VInfoAutoHover::SIGNAL_ALTITUDE
const string SIGNAL_ALTITUDE
Definition
SCR_VInfoAutoHover.c:10
SCR_VInfoAutoHover::m_HelicoperController
SCR_HelicopterControllerComponent m_HelicoperController
Definition
SCR_VInfoAutoHover.c:3
SCR_VInfoAutoHover::m_iSignalIndexAlt
int m_iSignalIndexAlt
Definition
SCR_VInfoAutoHover.c:9
SCR_VInfoAutoHover::m_SignalsManager
SignalsManagerComponent m_SignalsManager
Definition
SCR_VInfoAutoHover.c:4
SignalsManagerComponent
Definition
SignalsManagerComponent.c:13
scripts
Game
UI
HUD
VehicleInfo
SCR_VInfoAutoHover.c
Generated by
1.17.0