Home | Trees | Index | Help |
---|
Package pygsear :: Module Drawable :: Class Multi |
|
object
--+ |Sprite
--+ |Drawable
--+ |object
--+ | | |AbstractGroup
--+ | | |Group
--+ | | |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. | |
Add this sprite to a group. | |
add this sprite to a group | |
Add a sprite to this group. | |
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. |
Draw all of the sprites in the group. | |
empty() remove all sprites | |
try to correct for use of negative offset values when using addSprite. | |
return all of the sprites in the group, except self. | |
kill() remove this sprite from all groups | |
Move sprite to next location along path. | |
remove_internal(self,
group)
| |
Remove a sprite from this group. | |
Move along the path. | |
Set path for sprite to follow. | |
Move sprite to location, and all contained sprites to their relative offsets from location. | |
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. | |
Move sprite to location. | |
Inherited from Drawable | |
bool |
Performs a los (line of sight) check from the center of the source to the center of the target. |
Align the Drawable in its layer | |
return the direction from the sprite to a point | |
return the distance from the sprite to a point | |
return a copy of the sprite's position | |
return size of sprite's rect. | |
Move sprite. | |
return True if image is on the screen or layer. | |
stop moving along Path | |
set the collision pygame.Rect used for collision
checking. | |
Move sprite to a random location on screen | |
Set size of sprite's rect. | |
move sprite so that it does not overlap with other sprite | |
Change the size of sprite's image, and rect. | |
start moving along Path | |
Inherited from Sprite | |
| |
alive() -> bool check to see if the sprite is in any groups | |
groups() -> list of groups list used sprite containers | |
remove(group or list of groups, ...) remove a sprite from container | |
| |
Inherited from AbstractGroup | |
| |
| |
len(group) number of sprites in group | |
| |
copy() copy a group with all the same sprites | |
has(sprite or group, ...) ask if group has a sprite or 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 |
Class Variable Summary | |
---|---|
Inherited from AbstractGroup | |
bool |
_spritegroup = True
|
Method Details |
---|
__init__(self,
w=None)
Initialize Drawable sprite.
|
add(self, group)Add this sprite to a group. NOT add a sprite to this group!
|
add_internal(self, group)add this sprite to a group
|
addSprite(self, sprite, xOffset=0, yOffset=0)Add a sprite to this group. Note: does not work with negative offsets.
|
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.
|
fix_neg_offsets(self, xo, yo)try to correct for use of negative offset values when using addSprite. This is not working yet, and is not in use. |
innerSprites(self)return all of the sprites in the group, except self. |
kill(self)kill() remove this sprite from all groups Removes the sprite from all the groups that contain it. The sprite still exists after calling this, 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.
|
_set_position(self, location)Move sprite to location.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sat Dec 9 14:11:19 2006 | http://epydoc.sf.net |