Dayz Explorer
1.29.162510
Loading...
Searching...
No Matches
buoylight.c
Go to the documentation of this file.
1
class
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
43
class
MooringBuoyLight
extends
PointLightBase
44
{
45
const
string
LIGHT_MAT_ON
=
"DZ\\structures_sakhal\\industrial\\harbour\\data\\Mooring_Buoy_Glass_e.rvmat"
;
46
47
void
MooringBuoyLight
()
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
}
LIGHT_MAT_ON
class BuoyLight extends PointLightBase LIGHT_MAT_ON
MooringBuoyLight
void MooringBuoyLight()
Definition
buoylight.c:47
DimmingConfig
Definition
dimmingconfig.c:2
IEntity
Definition
enentity.c:165
PointLightBase
Definition
staticobj_roadblock_wood_small.c:28
PointLightBase::EOnFrame
override void EOnFrame(IEntity other, float timeSlice)
Definition
buoylight.c:25
PointLightBase::BASE_BRIGTHNESS
const int BASE_BRIGTHNESS
Definition
buoylight.c:5
PointLightBase::BuoyLight
void BuoyLight()
Definition
buoylight.c:9
PointLightBase::LIGHT_MAT_OFF
const string LIGHT_MAT_OFF
Definition
buoylight.c:4
PointLightBase::m_IsOn
bool m_IsOn
Definition
buoylight.c:7
ELightDimmingState
ELightDimmingState
Definition
lightdimming.c:2
Daten
4_world
entities
scriptedlightbase
pointlightbase
buoylight.c
Generated by
1.16.1