Module MyGameObjects :: Class MY_GameLight
[hide private]
[frames] | no frames]

Class MY_GameLight

source code

Known Subclasses:

base class of all the light objects in the game

Instance Methods [hide private]
 
__init__(self, scene, element, name) 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
Vector
getPosition(self, local=1)
gets the local position, if 'local' is True, otherwise it gets the global position
source code
 
deleteObject(self)
deletes the object and removes it from the scene
source code
Instance Variables [hide private]
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 object
  • name (String) - the name that represents the object in MY_SingleScene

setEnergy(self, energy)

source code 

sets the energy of the lamp

Parameters:
  • energy (Float) - the energy of the light object

setOrientation(self, angle, axis)

source code 

sets the local orientation

Parameters:
  • angle (Float) - the new rotation angle
  • axis (String (x,y,z)) - the rotation axis

setParent(self, parent_object)

source code 

sets objects as children of given parent object

Parameters:
  • parent_object (MY_GameObject)

getPosition(self, local=1)

source code 

gets the local position, if 'local' is True, otherwise it gets the global position

Parameters:
  • local (Boolean) - True if you want to get the local position of the object, otherwise global
Returns: Vector
the vector of the current global/local position