| |
- __builtin__.object
-
- Game
class Game(__builtin__.object) |
|
Game class.
You should instantiate it with a level.Level instance, and
optionally the resolution. The attributes that can be set
are res, clockspeed, shotfile, savefile. |
|
Methods defined here:
- __del__(self)
- __init__(self, level, res=(1024, 768))
- drawstatusbar(self)
- getcollisions(self)
- Returns collisions.
The collisions are a list of Event objects. All collisions are of
type COLLISION.
- getstatus(self)
- Returns status information.
Returns a oneline-string which gives information about the
present game situation. Useful to use as minor status bar.
This is only for testing purposes, in the future this becomes
better with a true statusbar.
- mainloop(self)
- Main game loop
- save(self, fn)
- Saves the current game to filename.
- update(self, altered)
- Refreshes the screen, possibly only the altered sections
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Game' objects>
- list of weak references to the object (if defined)
- clockspeed = 50
- paused = False
- prevcol = {}
- res = (1024, 768)
- savefile = './brian.sav'
- shotfile = './shot.tga'
| |