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_HandBrakeInfo.c
Go to the documentation of this file.
1
class
SCR_HandBrakeInfo
:
SCR_BaseVehicleInfo
2
{
3
protected
CarControllerComponent
m_pCarController
;
4
5
//------------------------------------------------------------------------------------------------
7
override
EVehicleInfoState
GetState
()
8
{
9
if
(!
m_pCarController
)
10
return
EVehicleInfoState
.DISABLED;
11
12
EVehicleInfoState
state =
EVehicleInfoState
.DISABLED;
13
m_bIsBlinking
=
false
;
14
if
(
m_pCarController
.GetHandBrake() ||
m_pCarController
.GetPersistentHandBrake())
15
{
16
VehicleWheeledSimulation
simulation =
m_pCarController
.GetSimulation();
17
if
(
m_pCarController
.IsEngineOn() && simulation && simulation.GetSpeedKmh() > 1)
18
state =
EVehicleInfoState
.WARNING;
19
else
20
state =
EVehicleInfoState
.ENABLED;
21
}
22
23
return
state;
24
}
25
26
//------------------------------------------------------------------------------------------------
28
override
void
DisplayInit
(
IEntity
owner)
29
{
30
super.DisplayInit(owner);
31
32
m_pCarController
=
CarControllerComponent
.Cast(owner.
FindComponent
(
CarControllerComponent
));
33
}
34
};
EVehicleInfoState
EVehicleInfoState
UI indicator state, controlling colors and opacity.
Definition
SCR_BaseVehicleInfo.c:6
CarControllerComponent
Definition
CarControllerComponent.c:13
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_HandBrakeInfo
Definition
SCR_HandBrakeInfo.c:2
SCR_HandBrakeInfo::m_pCarController
CarControllerComponent m_pCarController
Definition
SCR_HandBrakeInfo.c:3
SCR_HandBrakeInfo::DisplayInit
override void DisplayInit(IEntity owner)
Init the UI, runs 1x at the start of the game.
Definition
SCR_HandBrakeInfo.c:28
SCR_HandBrakeInfo::GetState
override EVehicleInfoState GetState()
Can be overridden to get state of actual system or linked to an event.
Definition
SCR_HandBrakeInfo.c:7
VehicleWheeledSimulation
Definition
VehicleWheeledSimulation.c:13
scripts
Game
UI
HUD
VehicleInfo
SCR_HandBrakeInfo.c
Generated by
1.17.0