Package pygsear :: Module Game :: Class GameConfiguration
[show private | hide private]
[frames | no frames]

Class GameConfiguration

object --+            
         |            
    Sprite --+        
             |        
      Drawable --+    
                 |    
         Layer --+    
                 |    
             Layer --+
                     |
        GameLooper --+
                     |
                    GameConfiguration


Used to configure the game

Right now, this allows choice of video mode, fullscreen/window, and allows the configuration to be saved on unix systems.

Eventually, it should be possible to configure keybindings here also, and to create generalized configuration interfaces.
Method Summary
  __init__(self, game)
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)
  addEventGroup(self, event)
return a Event.EventGroup (inherited from GameLooper)
  addGroup(self, sprites, layer)
return a SpriteGroup (inherited from GameLooper)
  addLayer(self, size)
return a Drawable.Layerand keep track. (inherited from GameLooper)
  alive(self)
alive() -> bool ask the life of a sprite (inherited from Sprite)
  beep(self)
(inherited from GameLooper)
  border(self, width, color, left, right, top, bottom)
Draw a border around the screen (inherited from Layer)
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)
center the Drawable in its layer (inherited from Layer)
  checkCollisions(self)
Defaults to no collision checks. (inherited from GameLooper)
  checkEvents(self)
(inherited from GameLooper)
  clear(self, surface)
erase image to background, returning affected rect (inherited from Layer)
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)
draw image, returning affected rect (inherited from Layer)
  get_position(self)
return a copy of the sprite's position (inherited from Drawable)
  get_size(self)
return size of sprite's rect. (inherited from Drawable)
  groups(self)
groups() -> list list used sprite containers (inherited from Sprite)
  grow(self, x, y)
  kill(self)
kill() end life of sprite, remove from all groups (inherited from Sprite)
  loop(self)
  move(self)
set position to next position on path (inherited from Drawable)
  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
  remove(self, group)
remove(group) remove a sprite from container (inherited from Sprite)
  remove_internal(self, group)
(inherited from Sprite)
  resize1024x768(self, arg)
  resize640x480(self, arg)
  resize800x600(self, arg)
  resize_reset(self, arg)
  runPath(self, frames)
call move() continuously (inherited from Drawable)
  save_config(self, arg)
  set_background(self, filename, img, tilename, tile, color)
Set the background. (inherited from Layer)
  set_crect(self, crect)
set the collision pygame.Rectused for collision checking. (inherited from Drawable)
  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_size(self, size)
Set size of sprite's rect. (inherited from Drawable)
  show_video_modes(self)
  shrink(self, x, y)
Resize the window (smaller)
  solid(self, other, move_both)
move sprite so that it does not overlap with other sprite (inherited from Drawable)
  stretch(self, dx, dy, size, keepAspectRatio)
Change the size of sprite's image, and rect. (inherited from Drawable)
  toggle_fullscreen(self, arg)
  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
  update(self, *args)
(inherited from Sprite)
  updateContents(self)
move and re-draw all the sprites that use this layer (inherited from Layer)
  _quit(self, arg)
set the .quitattribute. (inherited from GameLooper)
  _set_position(self, location)
Move sprite to location. (inherited from Drawable)
  _stop(self, arg)
set the .stopattribute. (inherited from GameLooper)

Method Details

__new__(S, ...)

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

pause(self)

stop moving along Path
Overrides:
pygsear.Drawable.Drawable.pause (inherited documentation)

shrink(self, x=50, y=50)

Resize the window (smaller)
Parameters:
x - horizontal amount to reduce size
y - vertical amount to reduce size

unpause(self)

start moving along Path
Overrides:
pygsear.Drawable.Drawable.unpause (inherited documentation)

Generated by Epydoc 1.1 on Sun Jan 25 19:10:13 2004 http://epydoc.sf.net