Module MyGameActiveHidden :: Class MY_SkyLight
[hide private]
[frames] | no frames]

Class MY_SkyLight

source code

MyGameObjects.MY_GameLight --+
                             |
                            MY_SkyLight

class of the sky lights to simulate a sun movement

Instance Methods [hide private]
 
__init__(self, scene, element, name) source code
 
setEnergyFade(self, max_amount, duration)
fades the energy of the light object to a given amount in a given time
source code
 
setRotation(self, plane, radius, pivot)
set an infinty rotation for day night effect rotation axis depends on plane
source code
    Inherited from MyGameObjects.MY_GameLight
 
deleteObject(self)
deletes the object and removes it from the scene
source code
Vector
getPosition(self, local=1)
gets the local position, if 'local' is True, otherwise it gets the global position
source code
 
setEnergy(self, energy)
sets the energy of the lamp
source code
 
setOrientation(self, angle, axis)
sets the local orientation
source code
 
setParent(self, parent_object)
sets objects as children of given parent object
source code
Instance Variables [hide private]
Float fadeStart
the start time for fading lights (on/off)
Boolean isFading
whether the light is fading or not
Float oldEnergy
the starting energy of the light object
    Inherited from MyGameObjects.MY_GameLight
KX_GameObject gObject
a blender game object
String name
the name that represents the object in MY_SingleScene
String type
a name which identifies the object as a specific class in MY_SingleScene
Method Details [hide private]

__init__(self, scene, element, name)
(Constructor)

source code 
Parameters:
  • scene (KX_Scene) - the blender scene object which holds all objects
  • element (String) - the name of the light object which shall included into the MY_SingleScene class
  • name (String) - the name the object shall have in MY_SingleScene
Overrides: MyGameObjects.MY_GameLight.__init__

setEnergyFade(self, max_amount, duration)

source code 

fades the energy of the light object to a given amount in a given time

Parameters:
  • max_amount (Float) - amount to fade to
  • duration (Float) - duration which shall be used to fade the light's energy

setRotation(self, plane, radius, pivot)

source code 

set an infinty rotation for day night effect rotation axis depends on plane

Parameters:
  • plane (Integer [0,1,2]) - the plane on which the light shall rotate
  • radius (Float) - the radius for the rotation
  • pivot (Vector) - the middle of the circle movement