Home | Trees | Index | Help |
---|
Package pygame :: Module sprite :: Class Group |
|
object
--+
|
Group
RenderClear
,
EventGroup
Method Summary | |
---|---|
__init__(sprite=()) instance a Group | |
__len__() -> int number of sprites in group | |
a new object with type S, a subtype of T |
|
__nonzero__() -> bool ask if group is empty | |
__repr__(self)
| |
add(sprite) add sprite to group | |
add_internal(self,
sprite)
| |
copy() -> Group copy a group with all the same sprites | |
empty() remove all sprites | |
has(sprite) -> bool ask if group has sprite | |
remove(sprite) remove sprite from group | |
remove_internal(self,
sprite)
| |
sprites() -> iterator return an object to loop over each sprite | |
update(...) call update for all member sprites |
Class Variable Summary | |
---|---|
int |
_spritegroup
|
Method Details |
---|
__init__(self,
sprite=())
|
__len__(self)
|
__new__(S, ...)
|
__nonzero__(self)
|
add(self, sprite)add(sprite) add sprite to group Add a sprite or sequence of sprites to a group. |
copy(self)copy() -> Group copy a group with all the same sprites Returns a copy of the group that is the same class type, and has the same contained sprites. |
empty(self)empty() remove all sprites Removes all the sprites from the group. |
has(self, sprite)has(sprite) -> bool ask if group has sprite Returns true if the given sprite or sprites are contained in the group |
remove(self, sprite)remove(sprite) remove sprite from group Remove a sprite or sequence of sprites from a group. |
sprites(self)sprites() -> iterator return an object to loop over each sprite Returns an object that can be looped over with a 'for' loop. (For now it is always a list, but newer version of python could return different objects, like iterators.) |
update(self, *args)update(...) call update for all member sprites calls the update method for all sprites in the group. Passes all arguments on to the Sprite update function. |
Class Variable Details |
---|
_spritegroup
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Nov 30 19:33:13 2003 | http://epydoc.sf.net |