DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BuoyLight.c
См. документацию.
1class BuoyLight extends PointLightBase
2{
3 const string LIGHT_MAT_ON = "DZ\\structures_sakhal\\industrial\\harbour\\data\\Buoy_01_glass_e.rvmat";
4 protected const string LIGHT_MAT_OFF = "DZ\\structures_sakhal\\industrial\\harbour\\data\\Buoy_01_glass.rvmat";
5 protected const int BASE_BRIGTHNESS = 5;
6
7 protected bool m_IsOn;
8
9 void BuoyLight()
10 {
11 SetBrightnessTo(BASE_BRIGTHNESS);
12 SetRadiusTo(15);
13 SetCastShadow(true);
14 SetVisibleDuringDaylight(false);
15 SetFlareVisible(false);
16 SetAmbientColor(1.0, 0.2, 0.2);
17 SetDiffuseColor(1.0, 0.2, 0.2);
18
19 DimmingConfig dimCfg = new DimmingConfig();
20 dimCfg.AddDimmingPattern({0}, {0.01}, {3}, {0.01}, {1});
21 dimCfg.SetPatternQueueRepeat(-1);
22 EnableDimming(BASE_BRIGTHNESS, dimCfg);
23 }
24
25 override void EOnFrame(IEntity other, float timeSlice)
26 {
27 if (!m_LightDimming)
28 return;
29
30 if (!m_IsOn && m_LightDimming.GetState() == ELightDimmingState.DIMMING)
31 {
32 m_IsOn = true;
33 UpdateLightSourceMaterial(LIGHT_MAT_OFF);
34 }
35 else if (m_IsOn && m_LightDimming.GetState() == ELightDimmingState.BRIGHTENING)
36 {
37 m_IsOn = false;
38 UpdateLightSourceMaterial(LIGHT_MAT_ON);
39 }
40 }
41}
42
44{
45 const string LIGHT_MAT_ON = "DZ\\structures_sakhal\\industrial\\harbour\\data\\Mooring_Buoy_Glass_e.rvmat";
46
48 {
49 SetBrightnessTo(5);
50 SetRadiusTo(10);
51 SetCastShadow(false);
52 SetVisibleDuringDaylight(false);
53 SetAmbientColor(1.0, 0.2, 0.2);
54 SetDiffuseColor(1.0, 0.2, 0.2);
55 }
56}
class BuoyLight extends PointLightBase LIGHT_MAT_ON
void MooringBuoyLight()
Определения BuoyLight.c:47
ELightDimmingState
Определения LightDimming.c:2
void AddDimmingPattern(array< int > brightnessTarget, array< float > dimSpeed, array< float > dimDuration, array< float > brightenSpeed, array< float > pause)
Определения DimmingConfig.c:78
void SetPatternQueueRepeat(int val)
Определения DimmingConfig.c:99
Определения DimmingConfig.c:2
Определения EnEntity.c:165
override void EOnFrame(IEntity other, float timeSlice)
Определения BuoyLight.c:25
const int BASE_BRIGTHNESS
Определения BuoyLight.c:5
void BuoyLight()
Определения BuoyLight.c:9
const string LIGHT_MAT_OFF
Определения BuoyLight.c:4
const string LIGHT_MAT_ON
Определения BuoyLight.c:3
bool m_IsOn
Определения BuoyLight.c:7