Home | Trees | Index | Help |
---|
Package pygame :: Module sprite :: Class Sprite |
|
object
--+
|
Sprite
Drawable
,
Event
Method Summary | |
---|---|
__init__(group=()) initialize a sprite object | |
a new object with type S, a subtype of T |
|
__repr__(self)
| |
add(group) add a sprite to container | |
add_internal(self,
group)
| |
alive() -> bool ask the life of a sprite | |
groups() -> list list used sprite containers | |
kill() end life of sprite, remove from all groups | |
remove(group) remove a sprite from container | |
remove_internal(self,
group)
| |
update(self,
*args)
|
Method Details |
---|
__init__(self,
group=())
|
__new__(S, ...)
|
add(self, group)add(group) add a sprite to container Add the sprite to a group or sequence of groups. |
alive(self)alive() -> bool ask the life of a sprite Returns true if this sprite is a member of any groups. |
groups(self)groups() -> list list used sprite containers Returns a list of all the groups that contain this sprite. |
kill(self)kill() end life of sprite, remove from all groups Removes the sprite from all the groups that contain it. The sprite is still fine after calling this kill() so you could use it to remove a sprite from all groups, and then add it to some other groups. |
remove(self, group)remove(group) remove a sprite from container Remove the sprite from a group or sequence of groups. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Jan 25 19:10:08 2004 | http://epydoc.sf.net |