DayZ 1.24
|
Private Member Functions | |
void | ScriptedLightBase () |
Constructor. Everything here is executed before the constructor of all children. | |
void | ~ScriptedLightBase () |
override void | EOnInit (IEntity other, int extra) |
override bool | IsScriptedLight () |
void | UpdateMode () |
void | UpdateLightMode (string slotName) |
void | DeleteLightWithDelay () |
Correct way of deleting light from memory. It is necesarry to have this delay due to hierarchy. | |
void | DeleteLightNow () |
void | AttachOnObject (Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Attaches this light on the parent entity, with optional position and orientation offset. | |
Object | GetAttachmentParent () |
Returns attachment parent. | |
void | AttachOnMemoryPoint (Object parent, string memory_point_start, string memory_point_target="") |
Attaches this light on the parent entity's memory point, with optional direction target memory point. | |
void | DetachFromParent () |
Detaches this light from its parent entity. | |
void | SetBrightnessTo (float value) |
Sets the brightness of the light. | |
void | CorrectLightPulseDuringDaylight () |
Call this after using SetBrightness(...) to fix light's intensity during daytime. | |
void | FadeBrightnessTo (float value, float time_in_s) |
Fades the brightness of the light to the given value. | |
void | SetRadiusTo (float value) |
Sets the radius of the light. | |
void | FadeRadiusTo (float value, float time_in_s) |
Fades the radius of the light to the given value. | |
void | Destroy () |
Switches off the light and deletes it from memory. | |
void | SetLifetime (float life_in_s) |
Makes the light destroy itself after the given time in seconds. The light will fade out if it's set to do so with SetFadeOutTime(...) | |
void | SetFadeOutTime (float time_in_s) |
Sets the fade out time in seconds. Fade out begins automatically as the light nears the end of its life time, or when method FadeOut() is called. | |
void | FadeOut (float time_in_s=-1) |
Starts the fade out process and destroys the light when its done. Optional parameter allows you to set time of this fade out in seconds. If not set, then default value (from SetFadeOutTime(...)) is used. | |
void | FadeIn (float time_in_s) |
Makes the light fade into existence. Works only at the moment the light is created. Consider using FadeBrightnessTo(...) and FadeRadiusTo(...) at anytime later during lifetime. | |
void | AddLifetime (float life_in_s) |
Prolongs the lifetime of the light in seconds. Use negative number to shorten its lifetime. | |
void | OnFrameLightSource (IEntity other, float timeSlice) |
Override this for custom functionality. | |
override void | EOnFrame (IEntity other, float timeSlice) |
On frame event. If you want to control your light within your own rules then override the event OnFrameLightSource and put your code there. | |
void | SetDancingShadowsAmplitude (float max_deviation_in_meters) |
Sets the maximum range of the point light within the dancing shadows effect. | |
void | SetDancingShadowsMovementSpeed (float speed_in_meters_per_frame) |
Sets the maximum speed of the point light within the dancing shadows effect. | |
float | GetDancingShadowsAmplitude () |
Returns max movement range of pointlight within the dancing shadow effect. | |
float | GetDancingShadowsMovementSpeed () |
Returns max movement speed of pointlight within the dancing shadow effect. | |
void | EnableDebug (bool state) |
Enables some debug functionality of this light. | |
void | HandleDancingShadows (float time, float timeSlice) |
void | HandleFlickering (float time, float timeSlice) |
void | SetFlickerSpeed (float speed) |
Sets speed of light flickering (random brightness coefficient change per second) | |
void | SetFlickerAmplitude (float coef) |
Sets the change coefficient of flickering light. (0.0 - 1.0 values, result of greater values are period time of light off ) | |
void | SetFlickerAmplitudeMax (float coef) |
void | SetFlickerAmplitudeMin (float coef) |
float | GetFlickerSpeed () |
Returns flicker speed. | |
float | GetFlickerAmplitudeCoefMax () |
Returns flicker amplitude maximum. | |
float | GetFlickerAmplitudeCoefMin () |
Returns flicker amplitude minimum. | |
void | TryShadowOptimization () |
Optimizes shadows by disabling them on this light source while it's within the given radius around the camera. | |
void | SetDisableShadowsWithinRadius (float radius_in_m) |
When the light source gets within this radius (radius_in_m) around the camera, then it's shadows are disabled. | |
float | GetDisableShadowsWithinRadius () |
Returns the range you put inside SetDisableShadowsWithinRadius(...) | |
void | CheckIfParentIsInCargo () |
bool | CheckLifetime (int current_time) |
void | CheckFadeOut (int current_time) |
void | HandleBrightnessFadeing (float timeSlice) |
void | HandleRadiusFadeing (float timeSlice) |
void | SetBlinkingSpeed (float _speed) |
Sets blinking speed (no blinking if speed <= 0) | |
float | GetBlinkingSpeed () |
Returns the speed of blinks. | |
void | HandleBlinking (float time) |
Static Private Member Functions | |
static ScriptedLightBase | CreateLightAtObjMemoryPoint (typename name, notnull Object target, string memory_point_start, string memory_point_target="", vector global_pos="0 0 0", float fade_in_time_in_s=0) |
static ScriptedLightBase | CreateLight (typename name, vector global_pos="0 0 0", float fade_in_time_in_s=0) |
Creates an instance of light on the given position. Optionally, use fade_in_time_in_s parameter to make the light fade into existence. | |
Static Private Attributes | |
static ref set< ScriptedLightBase > | m_NightTimeOnlyLights = new set<ScriptedLightBase>() |
Definition at line 10 of file ScriptedLightBase.c.
|
inlineprivate |
Definition at line 53 of file ScriptedLightBase.c.
Prolongs the lifetime of the light in seconds. Use negative number to shorten its lifetime.
Definition at line 342 of file ScriptedLightBase.c.
|
inlineprivate |
Attaches this light on the parent entity's memory point, with optional direction target memory point.
Definition at line 150 of file ScriptedLightBase.c.
References vector::Direction(), ErrorEx, and m_LocalPos.
|
inlineprivate |
Attaches this light on the parent entity, with optional position and orientation offset.
Definition at line 119 of file ScriptedLightBase.c.
References m_LocalOri, m_LocalPos, m_Parent, and SetPosition().
Definition at line 576 of file ScriptedLightBase.c.
|
inlineprivate |
Definition at line 530 of file ScriptedLightBase.c.
References m_Parent, and SetEnabled().
Definition at line 564 of file ScriptedLightBase.c.
References Destroy().
|
inlineprivate |
Call this after using SetBrightness(...) to fix light's intensity during daytime.
Definition at line 240 of file ScriptedLightBase.c.
|
inlinestaticprivate |
Creates an instance of light on the given position. Optionally, use fade_in_time_in_s parameter to make the light fade into existence.
Definition at line 204 of file ScriptedLightBase.c.
|
inlinestaticprivate |
Definition at line 192 of file ScriptedLightBase.c.
References CreateLight(), and name.
|
inlineprivate |
Definition at line 113 of file ScriptedLightBase.c.
References GetGame().
|
inlineprivate |
Correct way of deleting light from memory. It is necesarry to have this delay due to hierarchy.
Definition at line 98 of file ScriptedLightBase.c.
References CALL_CATEGORY_SYSTEM, GetGame(), and m_DeleteTimer.
|
inlineprivate |
Switches off the light and deletes it from memory.
Definition at line 289 of file ScriptedLightBase.c.
References m_Parent, and SetEnabled().
|
inlineprivate |
Detaches this light from its parent entity.
Definition at line 176 of file ScriptedLightBase.c.
References GetParent(), m_LocalOri, m_LocalPos, m_Parent, and Vector().
Enables some debug functionality of this light.
Definition at line 402 of file ScriptedLightBase.c.
On frame event. If you want to control your light within your own rules then override the event OnFrameLightSource and put your code there.
Definition at line 354 of file ScriptedLightBase.c.
Definition at line 63 of file ScriptedLightBase.c.
References GetGame(), and GetPlayer().
Fades the brightness of the light to the given value.
Definition at line 259 of file ScriptedLightBase.c.
References Math::AbsFloat().
Makes the light fade into existence. Works only at the moment the light is created. Consider using FadeBrightnessTo(...) and FadeRadiusTo(...) at anytime later during lifetime.
Definition at line 334 of file ScriptedLightBase.c.
Starts the fade out process and destroys the light when its done. Optional parameter allows you to set time of this fade out in seconds. If not set, then default value (from SetFadeOutTime(...)) is used.
Definition at line 313 of file ScriptedLightBase.c.
Fades the radius of the light to the given value.
Definition at line 278 of file ScriptedLightBase.c.
References Math::AbsFloat(), and m_Radius.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Returns max movement range of pointlight within the dancing shadow effect.
Definition at line 390 of file ScriptedLightBase.c.
|
inlineprivate |
Returns max movement speed of pointlight within the dancing shadow effect.
Definition at line 396 of file ScriptedLightBase.c.
|
inlineprivate |
Returns the range you put inside SetDisableShadowsWithinRadius(...)
Definition at line 525 of file ScriptedLightBase.c.
|
inlineprivate |
Returns flicker amplitude maximum.
Definition at line 493 of file ScriptedLightBase.c.
|
inlineprivate |
Returns flicker amplitude minimum.
Definition at line 499 of file ScriptedLightBase.c.
|
inlineprivate |
Returns flicker speed.
Definition at line 487 of file ScriptedLightBase.c.
Definition at line 662 of file ScriptedLightBase.c.
References Math::Round(), and Math::Sin().
Definition at line 590 of file ScriptedLightBase.c.
References Destroy().
Definition at line 408 of file ScriptedLightBase.c.
References ParticleList::DEBUG_DOT, GetPosition, m_LocalPos, m_Parent, ParticleManager(), Math::RandomFloat(), SetPosition(), and Vector().
Definition at line 446 of file ScriptedLightBase.c.
References Math::RandomFloat().
Definition at line 623 of file ScriptedLightBase.c.
Definition at line 74 of file ScriptedLightBase.c.
Override this for custom functionality.
Definition at line 348 of file ScriptedLightBase.c.
|
inlineprivate |
Constructor. Everything here is executed before the constructor of all children.
Definition at line 45 of file ScriptedLightBase.c.
References GetGame(), and SetEnabled().
Sets blinking speed (no blinking if speed <= 0)
Definition at line 650 of file ScriptedLightBase.c.
Sets the maximum range of the point light within the dancing shadows effect.
Definition at line 378 of file ScriptedLightBase.c.
References Math::AbsFloat().
|
inlineprivate |
Sets the maximum speed of the point light within the dancing shadows effect.
Definition at line 384 of file ScriptedLightBase.c.
References Math::AbsFloat().
When the light source gets within this radius (radius_in_m) around the camera, then it's shadows are disabled.
Definition at line 519 of file ScriptedLightBase.c.
Sets the fade out time in seconds. Fade out begins automatically as the light nears the end of its life time, or when method FadeOut() is called.
Definition at line 307 of file ScriptedLightBase.c.
Sets the change coefficient of flickering light. (0.0 - 1.0 values, result of greater values are period time of light off )
Definition at line 470 of file ScriptedLightBase.c.
References Math::AbsFloat().
Definition at line 476 of file ScriptedLightBase.c.
Definition at line 481 of file ScriptedLightBase.c.
Sets speed of light flickering (random brightness coefficient change per second)
Definition at line 464 of file ScriptedLightBase.c.
Makes the light destroy itself after the given time in seconds. The light will fade out if it's set to do so with SetFadeOutTime(...)
Definition at line 300 of file ScriptedLightBase.c.
References GetGame().
Sets the radius of the light.
Definition at line 270 of file ScriptedLightBase.c.
References m_Radius.
|
inlineprivate |
Optimizes shadows by disabling them on this light source while it's within the given radius around the camera.
Definition at line 505 of file ScriptedLightBase.c.
References vector::Distance(), GetGame(), and GetPosition.
|
inlineprivate |
Definition at line 79 of file ScriptedLightBase.c.
References InventorySlots::GetSlotName(), m_Parent, and slotName.
|
private |
Definition at line 31 of file ScriptedLightBase.c.
|
private |
Definition at line 18 of file ScriptedLightBase.c.
|
private |
Definition at line 19 of file ScriptedLightBase.c.
|
private |
Definition at line 21 of file ScriptedLightBase.c.
|
private |
Definition at line 22 of file ScriptedLightBase.c.
|
private |
Definition at line 20 of file ScriptedLightBase.c.
|
private |
Definition at line 24 of file ScriptedLightBase.c.
|
private |
Definition at line 23 of file ScriptedLightBase.c.
|
private |
Definition at line 28 of file ScriptedLightBase.c.
|
private |
Definition at line 38 of file ScriptedLightBase.c.
|
private |
Definition at line 29 of file ScriptedLightBase.c.
Definition at line 40 of file ScriptedLightBase.c.
|
private |
Definition at line 15 of file ScriptedLightBase.c.
|
private |
Definition at line 14 of file ScriptedLightBase.c.
Definition at line 33 of file ScriptedLightBase.c.
|
private |
Definition at line 13 of file ScriptedLightBase.c.
|
private |
Definition at line 12 of file ScriptedLightBase.c.
|
private |
Definition at line 37 of file ScriptedLightBase.c.
|
private |
Definition at line 36 of file ScriptedLightBase.c.
|
staticprivate |
Definition at line 42 of file ScriptedLightBase.c.
|
private |
Definition at line 26 of file ScriptedLightBase.c.
|
private |
Definition at line 35 of file ScriptedLightBase.c.
|
private |
Definition at line 16 of file ScriptedLightBase.c.
|
private |
Definition at line 25 of file ScriptedLightBase.c.
|
private |
Definition at line 17 of file ScriptedLightBase.c.