energy
energy
get/set the brightness of the light
Type: float number
Sample Code
########################## get light energy
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# get the brightness
bright = light.energy
########################## set light energy
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# set the brightness
light.energy = 2.5
|