Mercurial > pyntnclick
comparison gamelib/state.py @ 18:c9b124c2f5c6
Start of scene drawing framework.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sun, 22 Aug 2010 17:04:34 +0200 |
parents | e9dc681911c4 |
children | 8e709824306d |
comparison
equal
deleted
inserted
replaced
17:55f1969e41c9 | 18:c9b124c2f5c6 |
---|---|
1 """Utilities and base classes for dealing with scenes.""" | 1 """Utilities and base classes for dealing with scenes.""" |
2 | |
3 from albow.resource import get_image, get_sound | |
2 | 4 |
3 | 5 |
4 def initial_state(): | 6 def initial_state(): |
5 """Load the initial state.""" | 7 """Load the initial state.""" |
6 state = State() | 8 state = State() |
28 """Base class for scenes.""" | 30 """Base class for scenes.""" |
29 | 31 |
30 def __init__(self): | 32 def __init__(self): |
31 pass | 33 pass |
32 | 34 |
35 def draw_background(self, screen): | |
36 pass | |
37 | |
38 def draw_sprites(self, screen): | |
39 pass | |
40 | |
41 def draw(self, screen): | |
42 self.draw_background(screen) | |
43 self.draw_sprites(screen) | |
44 | |
33 | 45 |
34 class Item(object): | 46 class Item(object): |
35 """Base class for items.""" | 47 """Base class for items.""" |
36 | 48 |
37 def __init__(self): | 49 def __init__(self): |