Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
chemlightlight.c
Go to the documentation of this file.
1 class ChemlightLight extends PointLightBase
2 {
3  private static float m_DefaultBrightness = 1.5;
4  private static float m_DefaultRadius = 7.5;
5 
6  void ChemlightLight()
7  {
8  SetVisibleDuringDaylight(false);
9  SetRadiusTo(m_DefaultRadius);
10  SetBrightnessTo(m_DefaultBrightness);
11  FadeIn(1);
12  SetFadeOutTime(2);
13  SetFlareVisible(false);
14  }
15 
16  void SetIntensity( float coef, float time )
17  {
18  FadeBrightnessTo(m_DefaultBrightness * coef, time);
19  FadeRadiusTo(m_DefaultRadius * coef, time);
20  }
21 
22  void SetColorToWhite()
23  {
24  SetAmbientColor(0.9, 0.9, 1.0);
25  SetDiffuseColor(0.9, 0.9, 1.0);
26  }
27 
28  void SetColorToRed()
29  {
30  SetAmbientColor(1.0, 0.3, 0.2);
31  SetDiffuseColor(1.0, 0.3, 0.2);
32  }
33 
34  void SetColorToGreen()
35  {
36  SetAmbientColor(0.3, 1.0, 0.2);
37  SetDiffuseColor(0.3, 1.0, 0.2);
38  }
39 
40  void SetColorToBlue()
41  {
42  SetAmbientColor(0.3, 0.3, 1.0);
43  SetDiffuseColor(0.3, 0.3, 1.0);
44  }
45 
46  void SetColorToYellow()
47  {
48  SetAmbientColor(1.0, 1.0, 0.3);
49  SetDiffuseColor(1.0, 1.0, 0.3);
50  }
51 }
PointLightBase
Definition: staticobj_roadblock_wood_small.c:27
m_DefaultRadius
protected float m_DefaultRadius
Definition: contaminatedarea_dynamic.c:14
m_DefaultBrightness
enum eAreaDecayStage m_DefaultBrightness