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

Class MY_GameMerchItem

source code

MyGameObjects.MY_GameObjectActiveHidden --+
                                          |
                                         MY_GameMerchItem

class of the game merchandise items that can be collected by the player

Instance Methods [hide private]
 
__init__(self, scene, spawn_point) source code
 
setPosition(self, position)
set an item at top or bottom of a parented platform
source code
 
deleteObject(self)
deletes object, removes it from the scene and frees its id
source code
    Inherited from MyGameObjects.MY_GameObjectActiveHidden
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
Instance Variables [hide private]
    Inherited from MyGameObjects.MY_GameObjectActiveHidden
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, spawn_point)
(Constructor)

source code 
Parameters:
  • scene (KX_Scene) - the blender scene object which holds all objects
  • spawn_point (KX_GameObject) - the object where the merch item shall be spawned
Overrides: MyGameObjects.MY_GameObjectActiveHidden.__init__

setPosition(self, position)

source code 

set an item at top or bottom of a parented platform

Parameters:
  • position (Vector) - the vector of the new world position

deleteObject(self)

source code 

deletes object, removes it from the scene and frees its id

Overrides: MyGameObjects.MY_GameObjectActiveHidden.deleteObject