DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BrightnessTestLight.c
См. документацию.
1// Test case for light sources not working during daytime as expected
2
3class BrightnessTestLight extends PointLightBase
4{
5 float m_Timer = 0;
6
8 {
9 SetVisibleDuringDaylight(true);
10 SetRadiusTo( 30 );
11 SetCastShadow(true);
12 SetDiffuseColor(1, 1, 1);
13 SetAmbientColor(1, 1, 1);
14
15 SetBrightnessTo(10);
16 }
17
18 override void OnFrameLightSource(IEntity other, float timeSlice)
19 {
20 m_Timer += timeSlice;
21
22 float pulse = Math.AbsFloat( Math.Cos( m_Timer) );
23
24 if (pulse > 0)
25 {
26 Print(pulse);
27 SetBrightnessTo(pulse);
28 }
29 }
30}
Определения EnEntity.c:165
Определения EnMath.c:7
override void OnFrameLightSource(IEntity other, float timeSlice)
Определения BrightnessTestLight.c:18
void BrightnessTestLight()
Определения BrightnessTestLight.c:7
float m_Timer
Определения BrightnessTestLight.c:5
proto void Print(void var)
Prints content of variable to console/log.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float AbsFloat(float f)
Returns absolute value.