Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
partylight.c
Go to the documentation of this file.
1
class
PartyLight
extends
PointLightBase
2
{
3
float
m_Timer
= 0;
4
5
void
PartyLight
()
6
{
7
SetVisibleDuringDaylight(
true
);
8
SetRadiusTo( 30 );
9
SetBrightnessTo(1.0);
10
SetCastShadow(
true
);
11
//SetLifetime(600);
12
SetFadeOutTime(1);
13
}
14
15
override
void
OnFrameLightSource
(
IEntity
other,
float
timeSlice)
16
{
17
float
valS =
Math
.
AbsFloat
(
Math
.
Sin
(
m_Timer
*
Math
.
PI2
));
18
float
valC =
Math
.
AbsFloat
(
Math
.
Cos
(
m_Timer
*
Math
.
PI2
));
19
float
valT =
Math
.
AbsFloat
(
Math
.
Tan
(
m_Timer
*
Math
.
PI2
));
20
SetDiffuseColor(valS, valC, valT);
21
SetAmbientColor(valS, valC, valT);
22
23
24
m_Timer
+= timeSlice;
25
}
26
}
IEntity
Internal ancestor of all Entity implementations.
Definition
enentity.c:165
Math
Definition
enmath.c:7
PointLightBase
Definition
staticobj_roadblock_wood_small.c:28
PointLightBase::PartyLight
void PartyLight()
Definition
partylight.c:5
PointLightBase::OnFrameLightSource
override void OnFrameLightSource(IEntity other, float timeSlice)
Definition
partylight.c:15
PointLightBase::m_Timer
float m_Timer
Definition
brightnesstestlight.c:5
m_Timer
ref Timer m_Timer
Definition
dayzgame.c:707
Math::Cos
static proto float Cos(float angle)
Returns cosinus of angle in radians.
Math::Tan
static proto float Tan(float angle)
Returns tangent of angle in radians.
Math::AbsFloat
static proto float AbsFloat(float f)
Returns absolute value.
Math::PI2
static const float PI2
Definition
enmath.c:13
Math::Sin
static proto float Sin(float angle)
Returns sinus of angle in radians.
Games
Dayz
scripts
4_world
entities
scriptedlightbase
pointlightbase
partylight.c
Generated by
1.17.0