source: nagslang/screens/base.py@ 20:347667c941de

Last change on this file since 20:347667c941de was 20:347667c941de, checked in by Simon Cross <hodgestar@…>, 8 years ago

Hook up area.

File size: 554 bytes
Line 
1"""A screen or area in which action happens."""
2
3from pygame import event
4import pymunk
5
6
7class Screen(object):
8
9 def __init__(self):
10 self.space = pymunk.Space()
11
12 def setup(self, world):
13 """Perform setup based on the world state."""
14 pass
15
16 def teardown(self):
17 pass
18
19 def post_event(self, ev):
20 event.post(ev)
21
22 def handle_event(self, ev):
23 pass
24
25 def render(self, surface):
26 pass
27
28 def tick(self, step):
29 """Step the given amount of time."""
30 self.space.step(step)
Note: See TracBrowser for help on using the repository browser.