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_CharacterPerceivableComponent.c
Go to the documentation of this file.
1
class
SCR_CharacterPerceivableComponentClass
:
CharacterPerceivableComponentClass
2
{
3
}
4
5
class
SCR_CharacterPerceivableComponent :
CharacterPerceivableComponent
6
{
7
protected
SCR_CharacterControllerComponent
m_CharacterController
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
EOnInit
(
IEntity
owner)
11
{
12
ChimeraCharacter
character =
ChimeraCharacter
.Cast(owner);
13
if
(!character)
14
return
;
15
16
m_CharacterController
=
SCR_CharacterControllerComponent
.Cast(character.GetCharacterController());
17
18
if
(
m_CharacterController
)
19
m_CharacterController
.m_OnLifeStateChanged.Insert(
OnLifeStateChanged
);
20
}
21
22
//------------------------------------------------------------------------------------------------
23
// destructor
24
void
~SCR_CharacterPerceivableComponent
()
25
{
26
if
(
m_CharacterController
)
27
m_CharacterController
.m_OnLifeStateChanged.Remove(
OnLifeStateChanged
);
28
}
29
30
//------------------------------------------------------------------------------------------------
31
protected
void
OnLifeStateChanged
(
ECharacterLifeState
previousLifeState,
ECharacterLifeState
newLifeState)
32
{
33
bool
disarmed = newLifeState !=
ECharacterLifeState
.ALIVE;
34
SetDisarmed(disarmed);
35
}
36
}
OnLifeStateChanged
func OnLifeStateChanged
Definition
SCR_CharacterControllerComponent.c:17
~SCR_CharacterPerceivableComponent
void ~SCR_CharacterPerceivableComponent()
Definition
SCR_CharacterPerceivableComponent.c:24
m_CharacterController
SCR_CharacterPerceivableComponentClass m_CharacterController
CharacterPerceivableComponentClass
Definition
CharacterPerceivableComponentClass.c:13
CharacterPerceivableComponent
Definition
CharacterPerceivableComponent.c:13
ChimeraCharacter
Definition
ChimeraCharacter.c:13
IEntity
Definition
IEntity.c:13
SCR_CharacterControllerComponent
Definition
SCR_CharacterControllerComponent.c:36
SCR_CharacterPerceivableComponentClass
Definition
SCR_CharacterPerceivableComponent.c:2
EOnInit
override void EOnInit(IEntity owner)
Definition
SCR_AIConfigComponent.c:87
ECharacterLifeState
ECharacterLifeState
Definition
ECharacterLifeState.c:13
scripts
Game
AI
Components
SCR_CharacterPerceivableComponent.c
Generated by
1.17.0