6 protected void OnFlashlightStateChanged(
bool state)
13 cameraComponent.GetOnCameraCreate().Remove(InitFlashlight);
19 m_FlashLight.GetOnLightChanged().Insert(OnFlashlightStateChanged);
20 OnFlashlightStateChanged(m_FlashLight.IsLightOn());
23 override bool IsServer()
28 override bool CanBeShown(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
32 override bool CanBePerformed(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
37 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
40 m_FlashLight.ToggleLight();
47 if (cameraComponent && !camera)
48 cameraComponent.GetOnCameraCreate().Insert(InitFlashlight);
50 InitFlashlight(camera);
54 override void Untrack()
56 if (!m_FlashLight)
return;
57 m_FlashLight.GetOnLightChanged().Remove(OnFlashlightStateChanged);