Home | Trees | Index | Help |
---|
Package pygsear :: Module Drawable :: Class Multi |
|
object
--+ |Sprite
--+ |Drawable
--+ |object
--+ | | |Group
--+ | | |RenderClear
--+ | | |RenderUpdates
--+ | Multi
Made up of a group of sprites.
Create other Drawable instances, then addSprite() them in.
xOffset - x distance from left side of group base position. yOffset - y distance from top side of group base position.Method Summary | |
---|---|
Initialize Drawable sprite. | |
__len__() -> int number of sprites in group (inherited from Group )
| |
a new object with type S, a subtype of T |
|
__nonzero__() -> bool ask if group is empty (inherited from Group )
| |
__repr__(self)
(inherited from Sprite )
| |
Add this sprite to a group. | |
add_internal(self,
group)
(inherited from Sprite )
| |
Add a sprite to this group. | |
alive() -> bool ask the life of a sprite (inherited from Sprite )
| |
bool |
Performs a los (line of sight) check from the center of the source to the center of the target. (inherited from Drawable )
|
Align the Drawable in its layer (inherited from Drawable )
| |
Erase all sprites in group to background | |
bool
|
return True if this sprite and other sprite overlap. |
Drawable or False
|
return True if this sprite and any in list of others collide. |
List
|
return True if this sprite and any in list of others collide. |
copy() -> Group copy a group with all the same sprites (inherited from Group )
| |
return the direction from the sprite to a point (inherited from Drawable )
| |
return the distance from the sprite to a point (inherited from Drawable )
| |
Draw all of the sprites in the group. | |
empty() remove all sprites | |
return a copy of the sprite's position (inherited from Drawable )
| |
return size of sprite's rect. (inherited from Drawable )
| |
groups() -> list list used sprite containers (inherited from Sprite )
| |
has(sprite) -> bool ask if group has sprite (inherited from Group )
| |
return all of the sprites in the group, except self. | |
kill() end life of sprite, remove from all groups | |
Move sprite to next location along path. | |
Move sprite. (inherited from Drawable )
| |
return True if image is on the screen or layer. (inherited from Drawable )
| |
stop moving along Path (inherited from Drawable )
| |
remove(group) remove a sprite from container (inherited from Sprite )
| |
remove_internal(self,
group)
(inherited from Sprite )
| |
Remove a sprite from this group. | |
Move along the path. | |
set the collision pygame.Rect used for collision
checking. (inherited from Drawable )
| |
Set path for sprite to follow. | |
Move sprite to location, and all contained sprites to their relative offsets from location. | |
Move sprite to a random location on screen (inherited from Drawable )
| |
Set size of sprite's rect. (inherited from Drawable )
| |
move sprite so that it does not overlap with other sprite (inherited from Drawable )
| |
return all of the sprites in the group (including self, since the group is itself a sprite). | |
Erase all of the sprites in the group and update the screen. | |
Draw all of the sprites in the group and update the screen. | |
start moving along Path (inherited from Drawable )
| |
update(self,
*args)
(inherited from Sprite )
| |
Move sprite to location. (inherited from Drawable )
|
Method Details |
---|
__init__(self,
w=None)
Initialize Drawable sprite.
|
__new__(S, ...)
|
add(self, group)Add this sprite to a group. NOT add a sprite to this group!
|
addSprite(self, sprite, xOffset=0, yOffset=0)Add a sprite to this group.
|
clear(self)Erase all sprites in group to background This does not return the affectedpygame.Rect .
|
collide(self, other)return True if this sprite and other sprite overlap. Uses the.crect attribute of each sprite to check for a
collision (overlap).
|
collidelist(self, lothers)return True if this sprite and any in list of others collide. The True value is the other sprite. Note that more than one sprite in the list may be colliding with the sprite, but only one is returned.
|
collidelistall(self, lothers)return True if this sprite and any in list of others collide. The True value is the list of colliding sprites, or if there is no collision, an empty sequence.
|
draw(self)Draw all of the sprites in the group.
|
empty(self)empty() remove all sprites Removes all the sprites from the group.
|
innerSprites(self)return all of the sprites in the group, except self. |
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.
|
move(self)Move sprite to next location along path. |
removeSprite(self, sprite)Remove a sprite from this group.
|
runPath(self, frames=0)Move along the path. This is used only in an interactive session.
|
set_path(self, path)Set path for sprite to follow.
|
set_position(self, location, *args)Move sprite to location, and all contained sprites to their relative offsets from location.
|
sprites(self)return all of the sprites in the group (including self, since the group is itself a sprite). |
uclear(self)Erase all of the sprites in the group and update the screen. |
udraw(self)Draw all of the sprites in the group and update the screen. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Nov 30 19:33:14 2003 | http://epydoc.sf.net |