Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditableEntityVisibilityChildComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor (Editables)", description: "")]
3 {
4 }
5 
7 
9 class SCR_EditableEntityVisibilityChildComponent : SCR_EditableEntityBaseChildComponent
10 {
11  //------------------------------------------------------------------------------------------------
12  override void EOnStateChanged(EEditableEntityState states, EEditableEntityState changedState, bool toSet)
13  {
14  if (m_Owner.IsDeleted())
15  return;
16 
17  if ((states & m_State) > 0)
18  m_Owner.SetFlags(EntityFlags.VISIBLE, true);
19  else
20  m_Owner.ClearFlags(EntityFlags.VISIBLE, true);
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override void EOnInit(IEntity owner)
25  {
26  owner.ClearFlags(EntityFlags.VISIBLE, true);
28  }
29 
30  //------------------------------------------------------------------------------------------------
31  override void OnPostInit(IEntity owner)
32  {
33  //--- Cannot ClearFlags() here, child entities are not yet spawned
34  SetEventMask(owner, EntityEvent.INIT);
35  super.OnPostInit(owner);
36  }
37 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
EOnStateChanged
SCR_EditableEntityVisibilityChildComponentClass SCR_EditableEntityBaseChildComponentClass EOnStateChanged(EEditableEntityState states, EEditableEntityState changedState, bool toSet)
Show editable entity only when its state is RENDERED.
Definition: SCR_EditableEntityVisibilityChildComponent.c:12
UpdateFromCurrentState
void UpdateFromCurrentState()
Update based on current state of editable entity.
Definition: SCR_EditableEntityBaseChildComponent.c:29
SCR_EditableEntityBaseChildComponentClass
Definition: SCR_EditableEntityBaseChildComponent.c:2
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_EditableEntityVisibilityChildComponent.c:31
SCR_EditableEntityBaseChildComponent
void SCR_EditableEntityBaseChildComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_EditableEntityBaseChildComponent.c:70
EOnInit
override void EOnInit(IEntity owner)
Definition: SCR_EditableEntityVisibilityChildComponent.c:24
m_State
private EEditableEntityState m_State
Definition: SCR_BaseEntitiesEditorUIEffect.c:3
SCR_EditableEntityVisibilityChildComponentClass
Definition: SCR_EditableEntityVisibilityChildComponent.c:2
m_Owner
SCR_AIGroupUtilityComponentClass m_Owner
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180