Module MySpecialLists :: Class MY_SingleIdList
[hide private]
[frames] | no frames]

Class MY_SingleIdList

source code

object --+
         |
        MY_SingleIdList

singleton class to hold unique ids for game objects

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
Integer
getElementId(self)
gets a free id for any game object
source code
 
setElementId(self, free_id)
sets an id free for further use
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, *args, **kargs) source code
Class Variables [hide private]
  __instance = None
Instance Variables [hide private]
List of Integer idList
the list of the used id's in the game
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(self, *args, **kargs)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getElementId(self)

source code 

gets a free id for any game object

Returns: Integer
returns a free id that can be used for a unique game element

setElementId(self, free_id)

source code 

sets an id free for further use

Parameters:
  • free_id (Integer) - the id that can be freed out of the idList