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

Class MY_GameObjectActiveHidden

source code

Known Subclasses:

base class of all the objects that are dynamic but have a lifetime, so they are temporary ingame

Instance Methods [hide private]
 
__init__(self, scene, element, spawn_point=0) source code
Boolean
getAlive(self, prota_pos)
checks if object's lifetime is expired or object is out of game view
source code
Vector
getPosition(self)
gets the world position
source code
 
setLinearVelocity(self, speed, local=True)
just a forwarding of the blender setLinearVelocity
source code
 
deleteObject(self)
deletes object, removes it from the scene and frees its id
source code
Instance Variables [hide private]
Integer elementId
the unique identifier for this object
KX_GameObject gObject
a blender game object
Integer lifeTime
specifies the lifetime of the spawned item (negative = infinite)
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
Integer (0,1,2) worldPlane
the number of the its current plane
Method Details [hide private]

__init__(self, scene, element, spawn_point=0)
(Constructor)

source code 
Parameters:
  • scene (KX_Scene) - the blender scene object which holds all objects
  • element (the name of the object) - String
  • spawn_point (KX_GameObject) - the object where the object shall be spawned

getAlive(self, prota_pos)

source code 

checks if object's lifetime is expired or object is out of game view

Returns: Boolean
True if the item is still alive, otherwise False

getPosition(self)

source code 

gets the world position

Returns: Vector
the current world position of the object

setLinearVelocity(self, speed, local=True)

source code 

just a forwarding of the blender setLinearVelocity

Parameters:
  • speed (Vector) - a vector with the speed of every single direction
  • local (Boolean) - True if velocity has effect just locally, else globally