base class — KX_GameObject
A Light object.
# Turn on a red alert light.
import bge
co = bge.logic.getCurrentController()
light = co.owner
light.energy = 1.0
light.color = [1.0, 0.0, 0.0]
The type of light - must be SPOT, SUN or NORMAL
The layer mask that this light affects object on.
Type: | bitfield |
---|
The brightness of this light.
Type: | float |
---|
The maximum distance this light can illuminate. (SPOT and NORMAL lights only).
Type: | float |
---|
The color of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
Type: | list [r, g, b] |
---|
The linear component of this light’s attenuation. (SPOT and NORMAL lights only).
Type: | float |
---|
The quadratic component of this light’s attenuation (SPOT and NORMAL lights only).
Type: | float |
---|
The cone angle of the spot light, in degrees (SPOT lights only).
Type: | float in [0 - 180]. |
---|
Specifies the intensity distribution of the spot light (SPOT lights only).
Type: | float in [0 - 1] |
---|
Note
Higher values result in a more focused light source.