DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ScriptLight.c
См. документацию.
1#ifdef GAME_TEMPLATE
2
3[EditorAttribute("box", "GameLib/Scripted", "Script light", "-0.25 -0.25 -0.25", "0.25 0.25 0.25", "255 0 0 255")]
4class ScriptLightClass
5{
6
7}
8
9ScriptLightClass ScriptLightSource;
10
11class ScriptLight: GenericEntity
12{
13 [Attribute("1", "flags", "Flags", "", { ParamEnum("Point", "1"), ParamEnum("Spot", "2"), ParamEnum("Directional", "4") } )]
14 int Flags;
15 [Attribute("1", "combobox", "Type", "", { ParamEnum("Point", "1"), ParamEnum("Spot", "2"), ParamEnum("Directional", "3") } )]
16 int Type;
17 [Attribute("1", "editbox", "Radius", "", NULL )]
18 float Radius;
19 [Attribute("1 1 1", "color", "Color", "", NULL )]
20 vector Color;
21 [Attribute("1", "editbox", "Intensity", "", NULL )]
22 float Intensity;
23 HLIGHT m_light;
24
25 void ScriptLight(IEntitySource src, IEntity parent)
26 {
27 //SetFlags(this, EntityFlags.ACTIVE | EntityFlags.SOLID | EntityFlags.VISIBLE);
28 m_light = AddLight(this, LightType.POINT, LightFlags.DYNAMIC|LightFlags.CASTSHADOW, Radius, Color * Intensity);
29 }
30
31 void ~ScriptLight()
32 {
33 if(m_light)
34 {
35 RemoveLight(m_light);
36 }
37 }
38}
39
40#endif
int[] IEntitySource
Определения EnEntity.c:2
string Type
Определения JsonDataContaminatedArea.c:11
float Radius
Определения UndergroundAreaLoader.c:17
void ParamEnum(string key, string value, string desc="")
Определения EnEntity.c:809
void EditorAttribute(string style, string category, string description, vector sizeMin, vector sizeMax, string color, string color2="0 0 0 0", bool visible=true, bool insertable=true, bool dynamicBox=false)
Определения EnEntity.c:854
proto native bool RemoveLight(HLIGHT light)
removes light
int[] HLIGHT
Light handle.
Определения EnWorld.c:122
LightFlags
Определения EnWorld.c:133
proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color)
LightType
Определения EnWorld.c:125