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_VehicleSoundComponent.c
Go to the documentation of this file.
1
[
EntityEditorProps
(
category
:
"GameScripted/Sound"
, description:
"Testing component"
)]
2
class
SCR_VehicleSoundComponentClass
:
VehicleSoundComponentClass
3
{
4
[
Attribute
(
""
,
UIWidgets
.Auto,
"HitZone State Signals"
)]
5
ref array<ref SCR_HitZoneStateSignalData> m_aHitZoneStateSignalData;
6
}
7
8
class
SCR_VehicleSoundComponent
:
VehicleSoundComponent
9
{
10
protected
ref array<ref SCR_HitZoneStateSignal>
m_aHitZoneStateSignal
= {};
11
12
//------------------------------------------------------------------------------------------------
13
protected
array<ref SCR_HitZoneStateSignalData>
GetHitZoneStateSignalData
()
14
{
15
SCR_VehicleSoundComponentClass
prefabData =
SCR_VehicleSoundComponentClass
.Cast(
GetComponentData
(
GetOwner
()));
16
if
(prefabData)
17
{
18
return
prefabData.m_aHitZoneStateSignalData;
19
}
20
21
return
null;
22
}
23
24
//------------------------------------------------------------------------------------------------
25
override
void
OnInit
(
IEntity
owner)
26
{
27
super.OnInit(owner);
28
29
RegisterHitZoneSignals
(owner);
30
}
31
32
//------------------------------------------------------------------------------------------------
33
protected
void
RegisterHitZoneSignals
(
IEntity
owner)
34
{
35
SignalsManagerComponent
signalsManagerComponent =
SignalsManagerComponent
.Cast(owner.
FindComponent
(
SignalsManagerComponent
) );
36
if
(!signalsManagerComponent)
37
return
;
38
39
SCR_DamageManagerComponent hitZoneContainerComponent = SCR_DamageManagerComponent.Cast(
GetOwner
().FindComponent(SCR_DamageManagerComponent));
40
if
(!hitZoneContainerComponent)
41
return
;
42
43
array<ref SCR_HitZoneStateSignalData> hitZoneStateSignalData =
GetHitZoneStateSignalData
();
44
if
(!hitZoneStateSignalData)
45
return
;
46
47
foreach
(
SCR_HitZoneStateSignalData
data
: hitZoneStateSignalData)
48
{
49
SCR_HitZoneStateSignal
hitZoneSignal =
new
SCR_HitZoneStateSignal
;
50
if
(hitZoneSignal.RegisterSignal(hitZoneContainerComponent,
data
, signalsManagerComponent))
51
m_aHitZoneStateSignal
.Insert(hitZoneSignal);
52
}
53
}
54
55
//------------------------------------------------------------------------------------------------
56
protected
void
UnregisterHitZoneSignals
()
57
{
58
foreach
(
SCR_HitZoneStateSignal
hitZoneStateSignal :
m_aHitZoneStateSignal
)
59
{
60
hitZoneStateSignal.UnregisterSignal();
61
}
62
63
m_aHitZoneStateSignal
.Clear();
64
}
65
66
//------------------------------------------------------------------------------------------------
67
// constructor
71
void
SCR_VehicleSoundComponent
(
IEntityComponentSource
src,
IEntity
ent,
IEntity
parent)
72
{
73
}
74
75
//------------------------------------------------------------------------------------------------
76
// destructor
77
void
~SCR_VehicleSoundComponent
()
78
{
79
UnregisterHitZoneSignals
();
80
}
81
}
GetComponentData
SCR_CharacterSoundComponentClass GetComponentData()
Definition
SCR_CharacterSoundComponent.c:132
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
UnregisterHitZoneSignals
void UnregisterHitZoneSignals()
Definition
SCR_VehicleSoundComponent.c:56
SCR_VehicleSoundComponent
void SCR_VehicleSoundComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_VehicleSoundComponent.c:71
m_aHitZoneStateSignal
SCR_VehicleSoundComponentClass m_aHitZoneStateSignal
RegisterHitZoneSignals
void RegisterHitZoneSignals(IEntity owner)
Definition
SCR_VehicleSoundComponent.c:33
~SCR_VehicleSoundComponent
void ~SCR_VehicleSoundComponent()
Definition
SCR_VehicleSoundComponent.c:77
GetHitZoneStateSignalData
array< ref SCR_HitZoneStateSignalData > GetHitZoneStateSignalData()
Definition
SCR_VehicleSoundComponent.c:13
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_HitZoneStateSignalData
Definition
SCR_HitZoneStateSignalData.c:3
SCR_HitZoneStateSignal
Definition
SCR_HitZoneStateSignal.c:2
SCR_VehicleSoundComponentClass
Definition
SCR_VehicleSoundComponent.c:3
SignalsManagerComponent
Definition
SignalsManagerComponent.c:13
SndComponent::GetOwner
proto external IEntity GetOwner()
UIWidgets
Definition
attributes.c:40
VehicleSoundComponentClass
Definition
VehicleSoundComponentClass.c:13
VehicleSoundComponent
Definition
VehicleSoundComponent.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
scripts
Game
Components
VehicleSoundComponent
SCR_VehicleSoundComponent.c
Generated by
1.17.0