This function will get the specified light parameters as an array with the following 6 elements -
- [0] = enabled / disabled (true / false)
- [1] = light type (see constants below)
- [2] = x position
- [3] = y position
- [4] = z position
- [5] = light radius (only for point lights, will be 0 for directional)
- [6] = light colour (a real)
The light type can be one of the following two constants:
常量 | 描述 |
---|---|
lighttype_dir | The light is a directional light |
lighttype_point | The light is a point light |
draw_light_get(ind)
参数 描述 ind The index number of the light (from 0 to 7)
Real(实数)
light_a = draw_light_get(1);
if light_a[5] < 200
{
light_a[5] += 5;
draw_light_define_point(1, 200, 123, 50, light_a[5], c_white);
}
The above code will get the values used to define the light indexed as "1", then check the radius and if it is less than 200 it will be increased and the light radius set to the new value.