pyj2d :: sprite :: Group :: Class Group

Class Group

object --+
         |
        Group

pyj2d.sprite.Group

Instance Methods
 
__init__(self, *sprites)
Return Group. Can optionally be called with sprite(s) to add.
 
__str__(self)
str(x)
 
__repr__(self)
repr(x)
 
__iter__(self)
 
__contains__(self, sprite)
 
__len__(self)
 
sprites(self)
Return list of sprites in the group.
 
copy(self)
Return copy of group.
 
add(self, *sprites)
Add sprite(s) to group.
 
remove(self, *sprites)
Remove sprite(s) from group.
 
has(self, *sprites)
Check if all sprite(s) in group.
 
draw(self, surface)
Draw sprite on surface.
 
clear(self, surface, background)
Clear previous sprite draw to surface using a background surface. The background argument can be a callback function.
 
empty(self)
Empty group.
 
update(self, *args)
Update sprites in group by calling sprite.update.

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

Properties

Inherited from object: __class__

Method Details

__init__(self, *sprites)
(Constructor)

 
Return Group. Can optionally be called with sprite(s) to add.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 
str(x)
Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

 
repr(x)
Overrides: object.__repr__
(inherited documentation)