Package pygsear :: Module Drawable :: Class MultiRotated
[show private | hide private]
[frames | no frames]

Class MultiRotated

object --+                
         |                
    Sprite --+            
             |            
      Drawable --+        
                 |        
        MultiImage --+    
                     |    
          RotatedImage --+
                         |
                        MultiRotated


Sprite with multiple auto-generated rotated images
Method Summary
  __init__(self, w, filenames, steps, colorkey, convert, cx, cy)
Initialize MultiRotated
a new object with type S, a subtype of T __new__(S, ...)
  __repr__(self)
(inherited from Sprite)
  add(self, group)
add(group) add a sprite to container (inherited from Sprite)
  add_internal(self, group)
(inherited from Sprite)
  addImage(self, filename, image, colorkey, convert)
add image to list of available images (inherited from MultiImage)
  alive(self)
alive() -> bool ask the life of a sprite (inherited from Sprite)
bool can_see(self, target, blocking_rects_list)
Performs a los (line of sight) check from the center of the source to the center of the target. (inherited from Drawable)
  center(self, x, y, dx, dy)
Align the Drawable in its layer (inherited from Drawable)
  clear(self, surface)
Erase sprite to background (inherited from Drawable)
bool collide(self, other)
return True if this sprite and other sprite overlap. (inherited from Drawable)
Drawable or False collidelist(self, lothers)
return True if this sprite and any in list of others collide. (inherited from Drawable)
List collidelistall(self, lothers)
return True if this sprite and any in list of others collide. (inherited from Drawable)
  direction(self, point)
return the direction from the sprite to a point (inherited from Drawable)
  distance(self, point)
return the distance from the sprite to a point (inherited from Drawable)
  draw(self, surface)
Blit image to layer (inherited from Drawable)
  flip(self, key)
Switch images for the sprite (inherited from RotatedImage)
  flip_images(self)
flip to the next set of images.
  get_position(self)
return a copy of the sprite's position (inherited from Drawable)
  get_rotation(self)
return angle of rotation (inherited from RotatedImage)
  get_size(self)
return size of sprite's rect. (inherited from Drawable)
  groups(self)
groups() -> list list used sprite containers (inherited from Sprite)
  kill(self)
kill() end life of sprite, remove from all groups (inherited from Sprite)
  move(self)
set position to next position on path
  nudge(self, dx, dy)
Move sprite. (inherited from Drawable)
  onscreen(self, slack, **kw)
return True if image is on the screen or layer. (inherited from Drawable)
  pause(self)
stop moving along Path (inherited from Drawable)
  remove(self, group)
remove(group) remove a sprite from container (inherited from Sprite)
  remove_internal(self, group)
(inherited from Sprite)
  removeImage(self, key)
remove image by name (inherited from MultiImage)
  reset_flip_images(self)
Flip back to the first image in the series and reset counter.
  rotate(self, rad)
rotate to the left by radians (inherited from RotatedImage)
  rotate_left(self)
set rotation rate to +2 (inherited from RotatedImage)
  rotate_right(self)
set rotation rate to -2 (inherited from RotatedImage)
  rotate_stop(self)
set rotation rate to 0 (inherited from RotatedImage)
  rotate_towards(self, point)
turn as quickly as possible towards a point (inherited from RotatedImage)
  runPath(self, frames)
call move() continuously (inherited from Drawable)
  set_closest(self)
flip to the image for the current direction (inherited from RotatedImage)
  set_crect(self, crect)
set the collision pygame.Rectused for collision checking. (inherited from Drawable)
  set_flip_images_rate(self, rate)
Used to animate the images automatically.
  set_image(self, key)
Change which image is being shown. (inherited from RotatedImage)
  set_path(self, path)
set which path to follow (inherited from Drawable)
  set_position(self, location, *args)
Move sprite to location. (inherited from Drawable)
  set_positionRandom(self, slack)
Move sprite to a random location on screen (inherited from Drawable)
  set_rotation(self, direction)
set angle of rotation (inherited from RotatedImage)
  set_rotationRate(self, rate)
set rate of rotation in radians / second (inherited from RotatedImage)
  set_size(self, size)
Set size of sprite's rect. (inherited from Drawable)
  solid(self, other, move_both)
move sprite so that it does not overlap with other sprite (inherited from Drawable)
  switch_images(self, f)
Change which set of images is being shown.
  uclear(self, surface)
clear sprite and update display (inherited from Drawable)
  udraw(self, surface)
Draw image and update display. (inherited from Drawable)
  unpause(self)
start moving along Path (inherited from Drawable)
  update(self, *args)
(inherited from Sprite)

Method Details

__init__(self, w=None, filenames=None, steps=4, colorkey=(0, 51, 0), convert=1, cx=None, cy=None)
(Constructor)

Initialize MultiRotated
Parameters:
w - Screen.Layer to draw in.
filenames - list of names of files from which to load images
steps - number of separate rotated images to create for each image in filenames Note -- does not work with > 360 steps
colorkey - set this colorkey on all rotated images
convert - boolean, 1 = convert() every rotated image
cx - x-coordinate of center of rotation relative to the upper left corner of the image.
cy - y-coordinate of center of rotation relative to the upper left corner of the image.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

flip_images(self)

flip to the next set of images.

move(self)

set position to next position on path
Overrides:
pygsear.Drawable.RotatedImage.move (inherited documentation)

reset_flip_images(self)

Flip back to the first image in the series and reset counter.

set_flip_images_rate(self, rate)

Used to animate the images automatically.
Parameters:
rate - number of times per second to switch to next image.

switch_images(self, f)

Change which set of images is being shown.
Parameters:
f - filename of original image.

Generated by Epydoc 1.1 on Sun Nov 30 19:33:11 2003 http://epydoc.sf.net