Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
universallightlight.c
Go to the documentation of this file.
1 class UniversallightLight extends SpotLightBase
2 {
3  private static float m_DefaultBrightness = 6.05;
4  private static float m_DefaultRadius = 25;
5  private static float m_DefaultAngle = 100;
6 
7  void UniversallightLight()
8  {
9  SetVisibleDuringDaylight( true );
10  SetRadiusTo( m_DefaultRadius );
11  SetSpotLightAngle( m_DefaultAngle );
12  SetCastShadow( true );
13  SetBrightnessTo( m_DefaultBrightness );
14  SetFadeOutTime( 0.15 );
15  SetAmbientColor( 0.95, 0.88, 0.8 );
16  SetDiffuseColor( 0.95, 0.88, 0.8 );
17  SetDisableShadowsWithinRadius( 1.2 );
18  }
19 
20  void SetIntensity( float coef, float time )
21  {
22  FadeBrightnessTo( m_DefaultBrightness * coef, time );
23  FadeRadiusTo( m_DefaultRadius * coef, time );
24  }
25 
26  override void UpdateLightMode( string slotName )
27  {
28  switch (slotName)
29  {
30  case "weaponFlashlight":
31  SetSpotLightAngle( m_DefaultAngle/2 );
32  SetRadiusTo( m_DefaultRadius * 1.8 );
33  break;
34 
35  default:
36  SetSpotLightAngle( m_DefaultAngle );
37  SetRadiusTo( m_DefaultRadius );
38  break;
39  }
40  }
41 }
m_DefaultRadius
protected float m_DefaultRadius
Definition: contaminatedarea_dynamic.c:14
SpotLightBase
Definition: carlightbase.c:1
slotName
PlayerSpawnPreset slotName
m_DefaultBrightness
enum eAreaDecayStage m_DefaultBrightness