Home | Trees | Index | Help |
---|
Package pygsear :: Module Drawable :: Class SpriteGroup |
|
object
--+ |AbstractGroup
--+ |Group
--+ |RenderUpdates
--+ | SpriteGroup
Specialized pygame.sprite.Group
with more
functionality.
SpriteGroup
is that it knows which
window its sprites live in and can draw()
and
clear()
them without needing to pass the screen or
background to the functions.
Method Summary | |
---|---|
Initialize the sprite group. | |
Add sprite to group. | |
Change the drawing level. | |
Clear all of the sprites in the group to the background. | |
Not used at this time. | |
draw(surface) draw all sprites onto the surface | |
Draw sprites which are not marked hidden | |
Call the kill method on every sprite in this group, to
remove all of the sprites from all of the groups they are in. | |
move(self)
| |
pop(self)
| |
Inherited from AbstractGroup | |
| |
| |
len(group) number of sprites in group | |
| |
| |
| |
copy() copy a group with all the same sprites | |
empty() remove all sprites | |
has(sprite or group, ...) ask if group has a sprite or sprites | |
| |
remove(sprite, list, or group, ...) remove sprite from group | |
| |
sprites() get a list of sprites in the group | |
update(*args) call update for all member sprites | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T |
Instance Variable Summary | |
---|---|
layer : Screen.Layer in which the sprites live. |
Class Variable Summary | |
---|---|
Inherited from AbstractGroup | |
bool |
_spritegroup = True
|
Method Details |
---|
__init__(self,
layer=None,
sprites=[])
Initialize the sprite group.
|
add(self, sprites, level=0)Add sprite to group.
|
change_level(self, level, to_level)Change the drawing level. |
clear(self)Clear all of the sprites in the group to the background.
|
clear_layer(self)Not used at this time. |
draw(self)draw(surface) draw all sprites onto the surface Draws all the sprites onto the given surface. It returns a list of rectangles, which should be passed to pygame.display.update()
|
draw_visible(self, surface=None)Draw sprites which are not marked hidden Looks for a .hidden property on each sprite and does not draw those with hidden True |
kill(self)Call thekill method on every sprite in this group, to
remove all of the sprites from all of the groups they are in.
|
Instance Variable Details |
---|
layerScreen.Layer in which the sprites live. All
draw() and clear() operations on the sprites
will use the layer's screen and bg
pygame.Surface s.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sat Dec 9 14:11:19 2006 | http://epydoc.sf.net |