My Project
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
GameObject.Layer Class Reference

List of all members.

Public Member Functions

def __init__
def addObject
def removeObject
def introduction
def catchingUp

Static Public Member Functions

def getLayerByName

Public Attributes

 layername
 The Layer's name.
 objects
 A list of the GameObjects in the Layer.

Static Public Attributes

list layers = []
 The list of Layers.

Detailed Description

A layer is a set of GameObjects. 
Grouping objects in layers can save CPU time

Constructor & Destructor Documentation

def GameObject.Layer.__init__ (   self,
  layername,
  initialobjects 
)
Layer.__init__(self, layername, objects)
Initialization funciton.

layername is the Layer's name

initialobjects is a list of GameObjects that belong to the Layer

Member Function Documentation

def GameObject.Layer.addObject (   self,
  obj 
)
Layer.addObject(self, obj)
A function that adds a GameObject obj to a Layer

Returns True if the object is successfully added and False otherwise
Generates a JSON friendly dictionary with
all the object's attributes and values.
This function is intended as a update on the object's state,
sent to receivers that are already able to identify the object.
def GameObject.Layer.getLayerByName (   layername) [static]
Layer.getLayerByName(layername) [STATIC]
Returns a Layer object given its name layername.
Returns None if there's no layer by that name
Generates a JSON friendly dictionary with
all the object's attributes and values.
This function is intended as a first introduction of the object,
to receivers that are unaware of its existence.
def GameObject.Layer.removeObject (   self,
  obj 
)
Layer.removeObject(self, obj)
A function that removes a GameObject obj from a Layer

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables