File size: 2,864 Bytes
24b81cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
enum LightSourceType
{
	NotDef,
	PointLight,
	SpotLight
};

class EntityLightSource extends Entity
{
	//---------------------------------------------------------------------------
	// Generic interface
	//---------------------------------------------------------------------------
	proto native void 			SetLightType(int pType); // This works only if it's caled in the light's constructor!
	proto native int  			GetLightType();

	proto native void 			SetEnabled(bool pState);
	proto native bool 			IsEnabled();

	proto native void 			SetCastShadow(bool pState);
	proto native bool 			GetCastShadow();

	proto native bool 			EnableSpecular(bool pState);
	proto native bool 			EnableLinear(bool pState);

	proto native void 			SetPulseCoef(float pState);

	proto native void 			SetVisibleDuringDaylight(bool pState);
	proto native bool 			IsVisibleDuringDaylight();

	proto native void 			SetRadius(float pValue);
	proto native float 			GetRadius();
	
	//---------------------------------------------------------------------------
	// heat haze
	//---------------------------------------------------------------------------
	proto native void 			EnableHeatHaze(bool pState);
	
	proto native void 			SetHeatHazeRadius(float pValue);
	proto native float 			GetHeatHazeRadius();

	proto native void 			SetHeatHazePower(float pValue);
	proto native float 			GetHeatHazePower();
	
	//---------------------------------------------------------------------------
	// colors & brightness
	//---------------------------------------------------------------------------
	proto native void   		SetDiffuseColor(float pRed, float pGreen, float pBlue);
	proto native void   		SetDiffuseColorV(vector pColorVector);
	proto native void   		SetDiffuseAlpha(float pAlpha);
	proto native vector 		GetDiffuseColorV();
	proto native float  		GetDiffuseAlpha();
	
	proto native void   		SetAmbientColor(float pRed, float pGreen, float pBlue);
	proto native void   		SetAmbientColorV(vector pColorVector);
	proto native void   		SetAmbientAlpha(float pAlpha);
	proto native vector 		GetAmbientColorV();
	proto native float  		GetAmbientAlpha();

	proto native void   		SetBrightness(float pValue);
	proto native float  		GetBrightness();
	
	//---------------------------------------------------------------------------
	// flares
	//---------------------------------------------------------------------------
	proto native void 			SetFlareVisible(bool pState);
	proto native bool			IsFlareVisible();
	proto native void			SetFlareRelPosition(vector pPosition);
	proto native vector			GetFlareRelPosition();

	//---------------------------------------------------------------------------
	// spot light specifics
	//---------------------------------------------------------------------------
	proto native void  			SetSpotLightAngle(float pValue);
	proto native float 			GetSpotLightAngle();
};