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_CharacterRegistrationComponent.c
Go to the documentation of this file.
1
[
EntityEditorProps
(
category
:
"GameScripted/Components"
, description:
"Registers characters and holds them in an array."
, color:
"0 0 255 255"
)]
2
class
SCR_CharacterRegistrationComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
class
SCR_CharacterRegistrationComponent
:
ScriptComponent
7
{
8
protected
static
ref array<SCR_ChimeraCharacter>
s_aChimeraCharacters
= {};
9
10
protected
IEntity
m_owner
;
11
12
//------------------------------------------------------------------------------------------------
14
static
array<SCR_ChimeraCharacter> GetChimeraCharacters()
15
{
16
return
s_aChimeraCharacters
;
17
}
18
19
//------------------------------------------------------------------------------------------------
20
override
void
OnDelete
(
IEntity
owner)
21
{
22
if
(!
s_aChimeraCharacters
)
23
return
;
24
25
SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(owner);
26
if
(character &&
s_aChimeraCharacters
.Find(character) != -1)
27
s_aChimeraCharacters
.RemoveItem(character);
28
}
29
30
//------------------------------------------------------------------------------------------------
31
override
void
OnPostInit
(
IEntity
owner)
32
{
33
m_owner
= owner;
34
35
if
(!
s_aChimeraCharacters
)
36
return
;
37
38
SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(owner);
39
if
(character)
40
s_aChimeraCharacters
.Insert(character);
41
}
42
43
//------------------------------------------------------------------------------------------------
44
// constructor
48
void
SCR_CharacterRegistrationComponent
(
IEntityComponentSource
src,
IEntity
ent,
IEntity
parent)
49
{
50
}
51
52
//------------------------------------------------------------------------------------------------
53
// destructor
54
void
~SCR_CharacterRegistrationComponent
()
55
{
56
SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(
m_owner
);
57
if
(character &&
s_aChimeraCharacters
.Find(character) != -1)
58
s_aChimeraCharacters
.RemoveItem(character);
59
}
60
}
~SCR_CharacterRegistrationComponent
void ~SCR_CharacterRegistrationComponent()
Definition
SCR_CharacterRegistrationComponent.c:54
s_aChimeraCharacters
SCR_CharacterRegistrationComponentClass s_aChimeraCharacters
SCR_CharacterRegistrationComponent
void SCR_CharacterRegistrationComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_CharacterRegistrationComponent.c:48
m_owner
IEntity m_owner
Definition
SCR_CharacterRegistrationComponent.c:10
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
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntity
Definition
IEntity.c:13
SCR_CharacterRegistrationComponentClass
Definition
SCR_CharacterRegistrationComponent.c:3
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
OnPostInit
@ OnPostInit
Definition
SndComponentCallbacks.c:15
OnDelete
@ OnDelete
Definition
SndComponentCallbacks.c:16
scripts
Game
Components
SCR_CharacterRegistrationComponent.c
Generated by
1.17.0