DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HeadtorchLight.c
См. документацию.
1class HeadtorchLight extends SpotLightBase
2{
3 private static float m_DefaultBrightness = 3;
4 private static float m_DefaultRadius = 20;
5
7 {
8 SetVisibleDuringDaylight( true );
9 SetRadiusTo( m_DefaultRadius );
10 SetSpotLightAngle( 95 );
11 SetCastShadow( true );
12 FadeIn( 0.06 );
13 SetBrightnessTo( m_DefaultBrightness );
14 SetAmbientColor( 0.92, 0.85, 0.58 );
15 SetDiffuseColor( 0.92, 0.85, 0.58 );
16 SetFadeOutTime( 0.1 );
17 //SetDisableShadowsWithinRadius(0.25); // Idea for optimization: Uncomment this to disable shadows from Headtorch while it's on player's head during 1P view.
18 }
19
21 {
22 SetAmbientColor( 0.92, 0.85, 0.86 );
23 SetDiffuseColor( 0.92, 0.85, 0.86 );
24 }
25
27 {
28 SetAmbientColor( 1.0, 0.2, 0.2 );
29 SetDiffuseColor( 1.0, 0.2, 0.2 );
30 }
31
32 void SetIntensity( float coef, float time )
33 {
34 FadeBrightnessTo( m_DefaultBrightness * coef, time );
35 FadeRadiusTo( m_DefaultRadius * coef, time );
36 }
37
39 {
40 if (!owner.IsFlagSet(EntityFlags.VISIBLE) && IsEnabled())
41 {
42 SetEnabled(false);
43 }
44 else if (owner.IsFlagSet(EntityFlags.VISIBLE) && !IsEnabled())
45 {
46 SetEnabled(true);
47 }
48 }
49}
float m_DefaultRadius
Определения ContaminatedArea_Dynamic.c:14
enum eAreaDecayStage m_DefaultBrightness
void SetEnabled()
prevents insider adding in the wrong position, HOTFIX
Определения TrapTrigger.c:119
Определения Building.c:6
void SetIntensity(float coef, float time)
Определения HeadtorchLight.c:32
static float m_DefaultRadius
Определения FlashlightLight.c:4
void SetColorToRed()
Определения HeadtorchLight.c:26
void PerformVisibilityCheck(EntityAI owner)
Определения HeadtorchLight.c:38
void HeadtorchLight()
Определения HeadtorchLight.c:6
void SetColorToWhite()
Определения HeadtorchLight.c:20
static float m_DefaultBrightness
Определения FlashlightLight.c:3
Определения CarLightBase.c:2
EntityFlags
Entity flags.
Определения EnEntity.c:115
proto native bool IsEnabled()
Enabled flag getter.