Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterPerceivableComponent.c
Go to the documentation of this file.
4
5class SCR_CharacterPerceivableComponent : CharacterPerceivableComponent
6{
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
19 m_CharacterController.m_OnLifeStateChanged.Insert(OnLifeStateChanged);
20 }
21
22 //------------------------------------------------------------------------------------------------
23 // destructor
29
30 //------------------------------------------------------------------------------------------------
31 protected void OnLifeStateChanged(ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
32 {
33 bool disarmed = newLifeState != ECharacterLifeState.ALIVE;
34 SetDisarmed(disarmed);
35 }
36}
void ~SCR_CharacterPerceivableComponent()
SCR_CharacterPerceivableComponentClass m_CharacterController
override void EOnInit(IEntity owner)
ECharacterLifeState